def test_create_vpnservice_all_params(self): """vpn-service-create all params.""" resource = 'vpnservice' cmd = vpnservice.CreateVPNService(test_cli20.MyApp(sys.stdout), None) subnet = 'mysubnet-id' router = 'myrouter-id' tenant_id = 'mytenant-id' my_id = 'my-id' name = 'myvpnservice' description = 'my-vpn-service' admin_state = True args = [ '--name', name, '--description', description, router, subnet, '--tenant-id', tenant_id ] position_names = [ 'admin_state_up', 'name', 'description', 'subnet_id', 'router_id', 'tenant_id' ] position_values = [ admin_state, name, description, subnet, router, tenant_id ] self._test_create_resource(resource, cmd, name, my_id, args, position_names, position_values)
def test_create_vpnservice_without_subnet(self): # vpn-service-create with no subnet provided. resource = 'vpnservice' cmd = vpnservice.CreateVPNService(test_cli20.MyApp(sys.stdout), None) router = 'myrouter-id' tenant_id = 'mytenant-id' my_id = 'my-id' admin_state = True args = [router, '--tenant-id', tenant_id] position_names = [ 'admin_state_up', 'subnet_id', 'router_id', 'tenant_id' ] position_values = [admin_state, None, router, tenant_id] self._test_create_resource(resource, cmd, None, my_id, args, position_names, position_values)
def test_create_vpnservice_with_limited_params(self): """vpn-service-create with limited params.""" resource = 'vpnservice' cmd = vpnservice.CreateVPNService(test_cli20.MyApp(sys.stdout), None) subnet = 'mysubnet-id' router = 'myrouter-id' tenant_id = 'mytenant-id' my_id = 'my-id' admin_state = True args = [router, subnet, '--tenant-id', tenant_id] position_names = [ 'admin_state_up', 'subnet_id', 'router_id', 'tenant_id' ] position_values = [admin_state, subnet, router, tenant_id] self._test_create_resource(resource, cmd, None, my_id, args, position_names, position_values)