The heat_integrationtests.functional.test_conditional_exposure Module

class heat_integrationtests.functional.test_conditional_exposure.RoleBasedExposureTest(*args, **kwargs)[source]

Bases: heat_integrationtests.functional.functional_base.FunctionalTestsBase

cvt_tmpl = ‘\nheat_template_version: 2015-10-15\n\nresources:\n cvt:\n type: OS::Cinder::VolumeType\n properties:\n name: cvt_test\n’
fl_tmpl = ‘\nheat_template_version: 2015-10-15\n\nresources:\n not4everyone:\n type: OS::Nova::Flavor\n properties:\n ram: 20000\n vcpus: 10\n’
host_aggr_tmpl = ‘\nheat_template_version: 2015-10-15\nparameters:\n az:\n type: string\n default: nova\nresources:\n cvt:\n type: OS::Nova::HostAggregate\n properties:\n name: aggregate_test\n availability_zone: {get_param: az}\n’
scenarios = [(‘r_nova_flavor’, {‘forbidden_r_type’: ‘OS::Nova::Flavor’, ‘template’: ‘\nheat_template_version: 2015-10-15\n\nresources:\n not4everyone:\n type: OS::Nova::Flavor\n properties:\n ram: 20000\n vcpus: 10\n’, ‘test_creation’: True, ‘stack_name’: ‘s_nova_flavor’}), (‘r_nova_host_aggregate’, {‘forbidden_r_type’: ‘OS::Nova::HostAggregate’, ‘template’: ‘\nheat_template_version: 2015-10-15\nparameters:\n az:\n type: string\n default: nova\nresources:\n cvt:\n type: OS::Nova::HostAggregate\n properties:\n name: aggregate_test\n availability_zone: {get_param: az}\n’, ‘test_creation’: True, ‘stack_name’: ‘s_nova_ost_aggregate’}), (‘r_cinder_vtype’, {‘forbidden_r_type’: ‘OS::Cinder::VolumeType’, ‘template’: ‘\nheat_template_version: 2015-10-15\n\nresources:\n cvt:\n type: OS::Cinder::VolumeType\n properties:\n name: cvt_test\n’, ‘test_creation’: True, ‘stack_name’: ‘s_cinder_vtype’}), (‘r_cinder_vtype_encrypt’, {‘forbidden_r_type’: ‘OS::Cinder::EncryptedVolumeType’, ‘test_creation’: False}), (‘r_neutron_qos’, {‘forbidden_r_type’: ‘OS::Neutron::QoSPolicy’, ‘test_creation’: False}), (‘r_neutron_qos_bandwidth_limit’, {‘forbidden_r_type’: ‘OS::Neutron::QoSBandwidthLimitRule’, ‘test_creation’: False}), (‘r_manila_share_type’, {‘forbidden_r_type’: ‘OS::Manila::ShareType’, ‘test_creation’: False})]
test_forbidden_resource_not_listed()[source]
test_non_admin_forbidden_create_resources()[source]

Fail to create resource w/o admin role.

Integration tests job runs as normal OpenStack user, and the resources above are configured to require admin role in default policy file of Heat.

class heat_integrationtests.functional.test_conditional_exposure.ServiceBasedExposureTest(*args, **kwargs)[source]

Bases: heat_integrationtests.functional.functional_base.FunctionalTestsBase

setUp()[source]
test_unavailable_resources_not_created()[source]
test_unavailable_resources_not_listed()[source]
unavailable_service = ‘Sahara’
unavailable_template = ‘\nheat_template_version: 2015-10-15\nparameters:\n instance_type:\n type: string\nresources:\n not_available:\n type: OS::Sahara::NodeGroupTemplate\n properties:\n plugin_name: fake\n hadoop_version: 0.1\n flavor: {get_param: instance_type}\n node_processes: []\n’