Test propagate_uplink_status on create port

Depends-On: Ie8260c332e24c1880f9f82e6b6dacca8415be842
Change-Id: Iffffb177990c8f615d962ad35b58ecf425143e37
Related-Bug: #1722720
This commit is contained in:
Hongbin Lu 2018-07-27 22:34:59 +00:00
parent 6f9bb77d98
commit 5da7333450
2 changed files with 24 additions and 1 deletions

View File

@ -16,7 +16,7 @@
tox_envlist: all
devstack_localrc:
TEMPEST_PLUGINS: /opt/stack/neutron-tempest-plugin
NETWORK_API_EXTENSIONS: address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dns-domain-ports,dns-integration,dvr,empty-string-filtering,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,filter-validation,fip-port-details,flavors,ip-substring-filtering,l3-flavors,l3-ha,l3_agent_scheduler,logging,metering,multi-provider,net-mtu,net-mtu-writable,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,qos,qos-bw-minimum-ingress,qos-fip,quotas,quota_details,rbac-policies,router,router_availability_zone,security-group,port-mac-address-regenerate,port-security-groups-filtering,segment,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-segment,standard-attr-timestamp,standard-attr-tag,subnet_allocation,trunk,trunk-details
NETWORK_API_EXTENSIONS: address-scope,agent,allowed-address-pairs,auto-allocated-topology,availability_zone,binding,default-subnetpools,dhcp_agent_scheduler,dns-domain-ports,dns-integration,dvr,empty-string-filtering,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,filter-validation,fip-port-details,flavors,ip-substring-filtering,l3-flavors,l3-ha,l3_agent_scheduler,logging,metering,multi-provider,net-mtu,net-mtu-writable,network-ip-availability,network_availability_zone,pagination,port-security,project-id,provider,qos,qos-bw-minimum-ingress,qos-fip,quotas,quota_details,rbac-policies,router,router_availability_zone,security-group,port-mac-address-regenerate,port-security-groups-filtering,segment,service-type,sorting,standard-attr-description,standard-attr-revisions,standard-attr-segment,standard-attr-timestamp,standard-attr-tag,subnet_allocation,trunk,trunk-details,uplink-status-propagation
devstack_plugins:
neutron: git://git.openstack.org/openstack/neutron.git
neutron-tempest-plugin: git://git.openstack.org/openstack/neutron-tempest-plugin.git
@ -27,6 +27,7 @@
neutron-qos: true
neutron-segments: true
neutron-trunk: true
neutron-uplink-status-propagation: true
devstack_local_conf:
post-config:
$NEUTRON_CONF:

View File

@ -134,6 +134,28 @@ class PortsTestJSON(base.BaseNetworkTest):
expected = [s['id'], s['id']]
self.assertEqual(expected, subnets)
@decorators.idempotent_id('9700828d-86eb-4f21-9fa3-da487a2d77f2')
@utils.requires_ext(extension="uplink-status-propagation",
service="network")
def test_create_port_with_propagate_uplink_status(self):
body = self.create_port(self.network, propagate_uplink_status=True)
self.assertTrue(body['propagate_uplink_status'])
body = self.client.list_ports(id=body['id'])['ports'][0]
self.assertTrue(body['propagate_uplink_status'])
body = self.client.show_port(body['id'])['port']
self.assertTrue(body['propagate_uplink_status'])
@decorators.idempotent_id('c396a880-0c7b-409d-a80b-800a3d09bdc4')
@utils.requires_ext(extension="uplink-status-propagation",
service="network")
def test_create_port_without_propagate_uplink_status(self):
body = self.create_port(self.network)
self.assertFalse(body['propagate_uplink_status'])
body = self.client.list_ports(id=body['id'])['ports'][0]
self.assertFalse(body['propagate_uplink_status'])
body = self.client.show_port(body['id'])['port']
self.assertFalse(body['propagate_uplink_status'])
class PortsSearchCriteriaTest(base.BaseSearchCriteriaTest):