<s> import sys <EOL> from neutronclient . neutron . v2_0 . vpn import vpnservice <EOL> from neutronclient . tests . unit import test_cli20 <EOL> class CLITestV20VpnServiceJSON ( test_cli20 . CLITestV20Base ) : <EOL> def test_create_vpnservice_all_params ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . CreateVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> subnet = '<STR_LIT>' <EOL> router = '<STR_LIT>' <EOL> tenant_id = '<STR_LIT>' <EOL> my_id = '<STR_LIT>' <EOL> name = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> admin_state = True <EOL> args = [ '<STR_LIT>' , name , <EOL> '<STR_LIT>' , description , <EOL> router , <EOL> subnet , <EOL> '<STR_LIT>' , tenant_id ] <EOL> position_names = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT:description>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> position_values = [ admin_state , name , description , <EOL> subnet , router , tenant_id ] <EOL> self . _test_create_resource ( resource , cmd , name , my_id , args , <EOL> position_names , position_values ) <EOL> def test_create_vpnservice_with_limited_params ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . CreateVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> subnet = '<STR_LIT>' <EOL> router = '<STR_LIT>' <EOL> tenant_id = '<STR_LIT>' <EOL> my_id = '<STR_LIT>' <EOL> admin_state = True <EOL> args = [ router , <EOL> subnet , <EOL> '<STR_LIT>' , tenant_id ] <EOL> position_names = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> position_values = [ admin_state , subnet , router , tenant_id ] <EOL> self . _test_create_resource ( resource , cmd , None , my_id , args , <EOL> position_names , position_values ) <EOL> def test_create_vpnservice_without_subnet ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . CreateVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> router = '<STR_LIT>' <EOL> tenant_id = '<STR_LIT>' <EOL> my_id = '<STR_LIT>' <EOL> admin_state = True <EOL> args = [ router , <EOL> '<STR_LIT>' , tenant_id ] <EOL> position_names = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> position_values = [ admin_state , None , router , tenant_id ] <EOL> self . _test_create_resource ( resource , cmd , None , my_id , args , <EOL> position_names , position_values ) <EOL> def test_list_vpnservice ( self ) : <EOL> resources = "<STR_LIT>" <EOL> cmd = vpnservice . ListVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources ( resources , cmd , True ) <EOL> def test_list_vpnservice_pagination ( self ) : <EOL> resources = "<STR_LIT>" <EOL> cmd = vpnservice . ListVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources_with_pagination ( resources , cmd ) <EOL> def test_list_vpnservice_sort ( self ) : <EOL> resources = "<STR_LIT>" <EOL> cmd = vpnservice . ListVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources ( resources , cmd , <EOL> sort_key = [ "<STR_LIT:name>" , "<STR_LIT:id>" ] , <EOL> sort_dir = [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> def test_list_vpnservice_limit ( self ) : <EOL> resources = "<STR_LIT>" <EOL> cmd = vpnservice . ListVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources ( resources , cmd , page_size = <NUM_LIT:1000> ) <EOL> def test_show_vpnservice_id ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . ShowVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> args = [ '<STR_LIT>' , '<STR_LIT:id>' , self . test_id ] <EOL> self . _test_show_resource ( resource , cmd , self . test_id , args , [ '<STR_LIT:id>' ] ) <EOL> def test_show_vpnservice_id_name ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . ShowVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> args = [ '<STR_LIT>' , '<STR_LIT:id>' , '<STR_LIT>' , '<STR_LIT:name>' , self . test_id ] <EOL> self . _test_show_resource ( resource , cmd , self . test_id , <EOL> args , [ '<STR_LIT:id>' , '<STR_LIT:name>' ] ) <EOL> def test_update_vpnservice ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . UpdateVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_update_resource ( resource , cmd , '<STR_LIT>' , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> { '<STR_LIT:name>' : '<STR_LIT>' , } ) <EOL> def test_delete_vpnservice ( self ) : <EOL> resource = '<STR_LIT>' <EOL> cmd = vpnservice . DeleteVPNService ( test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> my_id = '<STR_LIT>' <EOL> args = [ my_id ] <EOL> self . _test_delete_resource ( resource , cmd , my_id , args ) </s>
