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', {'stack_name': 's_nova_flavor', 'test_creation': True, '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', 'forbidden_r_type': 'OS::Nova::Flavor'}), ('r_nova_host_aggregate', {'stack_name': 's_nova_ost_aggregate', 'test_creation': True, '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', 'forbidden_r_type': 'OS::Nova::HostAggregate'}), ('r_cinder_vtype', {'stack_name': 's_cinder_vtype', 'test_creation': True, 'template': '\nheat_template_version: 2015-10-15\n\nresources:\n cvt:\n type: OS::Cinder::VolumeType\n properties:\n name: cvt_test\n', 'forbidden_r_type': 'OS::Cinder::VolumeType'}), ('r_cinder_vtype_encrypt', {'test_creation': False, 'forbidden_r_type': 'OS::Cinder::EncryptedVolumeType'}), ('r_neutron_qos', {'test_creation': False, 'forbidden_r_type': 'OS::Neutron::QoSPolicy'}), ('r_neutron_qos_bandwidth_limit', {'test_creation': False, 'forbidden_r_type': 'OS::Neutron::QoSBandwidthLimitRule'}), ('r_manila_share_type', {'test_creation': False, 'forbidden_r_type': 'OS::Manila::ShareType'})]
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'