<s> """<STR_LIT>""" <EOL> import sys <EOL> import unittest <EOL> import datetime <EOL> from libcloud . utils . py3 import httplib <EOL> from libcloud . compute . drivers . gce import ( GCENodeDriver , API_VERSION , <EOL> timestamp_to_datetime , <EOL> GCEAddress , GCEBackendService , <EOL> GCEFirewall , GCEForwardingRule , <EOL> GCEHealthCheck , GCENetwork , <EOL> GCENodeImage , GCERoute , <EOL> GCETargetHttpProxy , GCEUrlMap , <EOL> GCEZone ) <EOL> from libcloud . common . google import ( GoogleBaseAuthConnection , <EOL> ResourceNotFoundError , ResourceExistsError , <EOL> InvalidRequestError , GoogleBaseError ) <EOL> from libcloud . test . common . test_google import GoogleAuthMockHttp , GoogleTestCase <EOL> from libcloud . compute . base import Node , StorageVolume <EOL> from libcloud . test import MockHttpTestCase <EOL> from libcloud . test . compute import TestCaseMixin <EOL> from libcloud . test . file_fixtures import ComputeFileFixtures <EOL> from libcloud . test . secrets import GCE_PARAMS , GCE_KEYWORD_PARAMS <EOL> class GCENodeDriverTest ( GoogleTestCase , TestCaseMixin ) : <EOL> """<STR_LIT>""" <EOL> GCEZone . _now = lambda x : datetime . datetime ( <NUM_LIT> , <NUM_LIT:6> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> datacenter = '<STR_LIT>' <EOL> def setUp ( self ) : <EOL> GCEMockHttp . test = self <EOL> GCENodeDriver . connectionCls . conn_classes = ( GCEMockHttp , GCEMockHttp ) <EOL> GoogleBaseAuthConnection . conn_classes = ( GoogleAuthMockHttp , <EOL> GoogleAuthMockHttp ) <EOL> GCEMockHttp . type = None <EOL> kwargs = GCE_KEYWORD_PARAMS . copy ( ) <EOL> kwargs [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> kwargs [ '<STR_LIT>' ] = self . datacenter <EOL> self . driver = GCENodeDriver ( * GCE_PARAMS , ** kwargs ) <EOL> def test_default_scopes ( self ) : <EOL> self . assertEqual ( self . driver . scopes , None ) <EOL> def test_timestamp_to_datetime ( self ) : <EOL> timestamp1 = '<STR_LIT>' <EOL> datetime1 = datetime . datetime ( <NUM_LIT> , <NUM_LIT:6> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:5> , <NUM_LIT> ) <EOL> self . assertEqual ( timestamp_to_datetime ( timestamp1 ) , datetime1 ) <EOL> timestamp2 = '<STR_LIT>' <EOL> datetime2 = datetime . datetime ( <NUM_LIT> , <NUM_LIT:6> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:15> ) <EOL> self . assertEqual ( timestamp_to_datetime ( timestamp2 ) , datetime2 ) <EOL> def test_get_object_by_kind ( self ) : <EOL> obj = self . driver . _get_object_by_kind ( None ) <EOL> self . assertIsNone ( obj ) <EOL> obj = self . driver . _get_object_by_kind ( '<STR_LIT>' ) <EOL> self . assertIsNone ( obj ) <EOL> obj = self . driver . _get_object_by_kind ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> self . assertEqual ( obj . name , '<STR_LIT>' ) <EOL> def test_get_region_from_zone ( self ) : <EOL> zone1 = self . driver . ex_get_zone ( '<STR_LIT>' ) <EOL> expected_region1 = '<STR_LIT>' <EOL> region1 = self . driver . _get_region_from_zone ( zone1 ) <EOL> self . assertEqual ( region1 . name , expected_region1 ) <EOL> zone2 = self . driver . ex_get_zone ( '<STR_LIT>' ) <EOL> expected_region2 = '<STR_LIT>' <EOL> region2 = self . driver . _get_region_from_zone ( zone2 ) <EOL> self . assertEqual ( region2 . name , expected_region2 ) <EOL> def test_find_zone_or_region ( self ) : <EOL> zone1 = self . driver . _find_zone_or_region ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> self . assertEqual ( zone1 . name , '<STR_LIT>' ) <EOL> zone2 = self . driver . _find_zone_or_region ( <EOL> '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( zone2 . name , '<STR_LIT>' ) <EOL> region = self . driver . _find_zone_or_region ( '<STR_LIT>' , <EOL> '<STR_LIT>' , region = True ) <EOL> self . assertEqual ( region . name , '<STR_LIT>' ) <EOL> def test_match_images ( self ) : <EOL> project = '<STR_LIT>' <EOL> image = self . driver . _match_images ( project , '<STR_LIT>' ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> image = self . driver . _match_images ( project , '<STR_LIT>' ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> def test_ex_get_serial_output ( self ) : <EOL> self . assertRaises ( ValueError , self . driver . ex_get_serial_output , '<STR_LIT:foo>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertTrue ( self . driver . ex_get_serial_output ( node ) , <EOL> '<STR_LIT>' ) <EOL> def test_ex_list ( self ) : <EOL> d = self . driver <EOL> for list_fn in ( d . ex_list_addresses , <EOL> d . ex_list_backendservices , <EOL> d . ex_list_disktypes , <EOL> d . ex_list_firewalls , <EOL> d . ex_list_forwarding_rules , <EOL> d . ex_list_healthchecks , <EOL> d . ex_list_networks , <EOL> d . ex_list_project_images , <EOL> d . ex_list_regions , <EOL> d . ex_list_routes , <EOL> d . ex_list_snapshots , <EOL> d . ex_list_targethttpproxies , <EOL> d . ex_list_targetinstances , <EOL> d . ex_list_targetpools , <EOL> d . ex_list_urlmaps , <EOL> d . ex_list_zones , <EOL> d . list_images , <EOL> d . list_locations , <EOL> d . list_nodes , <EOL> d . list_sizes , <EOL> d . list_volumes ) : <EOL> full_list = [ item . name for item in list_fn ( ) ] <EOL> li = d . ex_list ( list_fn ) <EOL> iter_list = [ item . name for sublist in li for item in sublist ] <EOL> self . assertEqual ( full_list , iter_list ) <EOL> list_fn = d . ex_list_regions <EOL> for count , sublist in zip ( ( <NUM_LIT:2> , <NUM_LIT:1> ) , d . ex_list ( list_fn ) . page ( <NUM_LIT:2> ) ) : <EOL> self . assertTrue ( len ( sublist ) == count ) <EOL> for sublist in d . ex_list ( list_fn ) . filter ( '<STR_LIT>' ) : <EOL> self . assertTrue ( len ( sublist ) == <NUM_LIT:1> ) <EOL> self . assertEqual ( sublist [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_addresses ( self ) : <EOL> address_list = self . driver . ex_list_addresses ( ) <EOL> address_list_all = self . driver . ex_list_addresses ( '<STR_LIT:all>' ) <EOL> address_list_uc1 = self . driver . ex_list_addresses ( '<STR_LIT>' ) <EOL> address_list_global = self . driver . ex_list_addresses ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( address_list ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( address_list_all ) , <NUM_LIT:5> ) <EOL> self . assertEqual ( len ( address_list_global ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( address_list [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( address_list_uc1 [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( address_list_global [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ a . name for a in address_list_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_backendservices ( self ) : <EOL> self . backendservices_mock = '<STR_LIT>' <EOL> backendservices_list = self . driver . ex_list_backendservices ( ) <EOL> self . assertListEqual ( backendservices_list , [ ] ) <EOL> self . backendservices_mock = '<STR_LIT>' <EOL> backendservices_list = self . driver . ex_list_backendservices ( ) <EOL> web_service = backendservices_list [ <NUM_LIT:0> ] <EOL> self . assertEqual ( web_service . name , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( web_service . healthchecks ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( len ( web_service . backends ) , <NUM_LIT:2> ) <EOL> def test_ex_list_healthchecks ( self ) : <EOL> healthchecks = self . driver . ex_list_healthchecks ( ) <EOL> self . assertEqual ( len ( healthchecks ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( healthchecks [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_firewalls ( self ) : <EOL> firewalls = self . driver . ex_list_firewalls ( ) <EOL> self . assertEqual ( len ( firewalls ) , <NUM_LIT:5> ) <EOL> self . assertEqual ( firewalls [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_forwarding_rules ( self ) : <EOL> forwarding_rules = self . driver . ex_list_forwarding_rules ( ) <EOL> forwarding_rules_all = self . driver . ex_list_forwarding_rules ( '<STR_LIT:all>' ) <EOL> forwarding_rules_uc1 = self . driver . ex_list_forwarding_rules ( <EOL> '<STR_LIT>' ) <EOL> self . assertEqual ( len ( forwarding_rules ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( forwarding_rules_all ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( forwarding_rules [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( forwarding_rules_uc1 [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ f . name for f in forwarding_rules_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_forwarding_rules_global ( self ) : <EOL> forwarding_rules = self . driver . ex_list_forwarding_rules ( global_rules = True ) <EOL> self . assertEqual ( len ( forwarding_rules ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( forwarding_rules [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ f . name for f in forwarding_rules ] <EOL> self . assertListEqual ( names , [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def test_list_images ( self ) : <EOL> local_images = self . driver . list_images ( ) <EOL> all_deprecated_images = self . driver . list_images ( ex_include_deprecated = True ) <EOL> debian_images = self . driver . list_images ( ex_project = '<STR_LIT>' ) <EOL> local_plus_deb = self . driver . list_images ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> self . assertEqual ( len ( local_images ) , <NUM_LIT> ) <EOL> self . assertEqual ( len ( all_deprecated_images ) , <NUM_LIT> ) <EOL> self . assertEqual ( len ( debian_images ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( local_plus_deb ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( local_images [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( debian_images [ <NUM_LIT:1> ] . name , '<STR_LIT>' ) <EOL> def test_list_locations ( self ) : <EOL> locations = self . driver . list_locations ( ) <EOL> self . assertEqual ( len ( locations ) , <NUM_LIT:6> ) <EOL> self . assertEqual ( locations [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_routes ( self ) : <EOL> routes = self . driver . ex_list_routes ( ) <EOL> self . assertEqual ( len ( routes ) , <NUM_LIT:3> ) <EOL> self . assertTrue ( '<STR_LIT>' in [ route . name for route in routes ] ) <EOL> def test_ex_list_networks ( self ) : <EOL> networks = self . driver . ex_list_networks ( ) <EOL> self . assertEqual ( len ( networks ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( networks [ <NUM_LIT:0> ] . name , '<STR_LIT:default>' ) <EOL> def test_list_nodes ( self ) : <EOL> nodes = self . driver . list_nodes ( ) <EOL> nodes_all = self . driver . list_nodes ( ex_zone = '<STR_LIT:all>' ) <EOL> nodes_uc1a = self . driver . list_nodes ( ex_zone = '<STR_LIT>' ) <EOL> self . assertEqual ( len ( nodes ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( len ( nodes_all ) , <NUM_LIT:8> ) <EOL> self . assertEqual ( len ( nodes_uc1a ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( nodes [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( nodes_uc1a [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ n . name for n in nodes_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_regions ( self ) : <EOL> regions = self . driver . ex_list_regions ( ) <EOL> self . assertEqual ( len ( regions ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( regions [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_snapshots ( self ) : <EOL> snapshots = self . driver . ex_list_snapshots ( ) <EOL> self . assertEqual ( len ( snapshots ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( snapshots [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_list_targethttpproxies ( self ) : <EOL> target_proxies = self . driver . ex_list_targethttpproxies ( ) <EOL> self . assertEqual ( len ( target_proxies ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( target_proxies [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ t . name for t in target_proxies ] <EOL> self . assertListEqual ( names , [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def test_ex_list_targetinstances ( self ) : <EOL> target_instances = self . driver . ex_list_targetinstances ( ) <EOL> target_instances_all = self . driver . ex_list_targetinstances ( '<STR_LIT:all>' ) <EOL> target_instances_uc1 = self . driver . ex_list_targetinstances ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( target_instances ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( target_instances_all ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( target_instances_uc1 ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( target_instances [ <NUM_LIT:0> ] . name , '<STR_LIT:hello>' ) <EOL> self . assertEqual ( target_instances_uc1 [ <NUM_LIT:0> ] . name , '<STR_LIT:hello>' ) <EOL> names = [ t . name for t in target_instances_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_targetpools ( self ) : <EOL> target_pools = self . driver . ex_list_targetpools ( ) <EOL> target_pools_all = self . driver . ex_list_targetpools ( '<STR_LIT:all>' ) <EOL> target_pools_uc1 = self . driver . ex_list_targetpools ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( target_pools ) , <NUM_LIT:4> ) <EOL> self . assertEqual ( len ( target_pools_all ) , <NUM_LIT:5> ) <EOL> self . assertEqual ( len ( target_pools_uc1 ) , <NUM_LIT:4> ) <EOL> self . assertEqual ( target_pools [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( target_pools_uc1 [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ t . name for t in target_pools_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_list_sizes ( self ) : <EOL> sizes = self . driver . list_sizes ( ) <EOL> sizes_all = self . driver . list_sizes ( '<STR_LIT:all>' ) <EOL> self . assertEqual ( len ( sizes ) , <NUM_LIT> ) <EOL> self . assertEqual ( len ( sizes_all ) , <NUM_LIT:100> ) <EOL> self . assertEqual ( sizes [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( sizes [ <NUM_LIT:0> ] . extra [ '<STR_LIT>' ] . name , '<STR_LIT>' ) <EOL> names = [ s . name for s in sizes_all ] <EOL> self . assertEqual ( names . count ( '<STR_LIT>' ) , <NUM_LIT:5> ) <EOL> def test_ex_get_license ( self ) : <EOL> license = self . driver . ex_get_license ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( license . name , '<STR_LIT>' ) <EOL> self . assertTrue ( license . charges_use_fee ) <EOL> def test_list_disktypes ( self ) : <EOL> disktypes = self . driver . ex_list_disktypes ( ) <EOL> disktypes_all = self . driver . ex_list_disktypes ( '<STR_LIT:all>' ) <EOL> disktypes_uc1a = self . driver . ex_list_disktypes ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( disktypes ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( disktypes_all ) , <NUM_LIT:9> ) <EOL> self . assertEqual ( len ( disktypes_uc1a ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( disktypes [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( disktypes_uc1a [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ v . name for v in disktypes_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_urlmaps ( self ) : <EOL> urlmaps_list = self . driver . ex_list_urlmaps ( ) <EOL> web_map = urlmaps_list [ <NUM_LIT:0> ] <EOL> self . assertEqual ( web_map . name , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( web_map . host_rules ) , <NUM_LIT:0> ) <EOL> self . assertEqual ( len ( web_map . path_matchers ) , <NUM_LIT:0> ) <EOL> self . assertEqual ( len ( web_map . tests ) , <NUM_LIT:0> ) <EOL> def test_list_volumes ( self ) : <EOL> volumes = self . driver . list_volumes ( ) <EOL> volumes_all = self . driver . list_volumes ( '<STR_LIT:all>' ) <EOL> volumes_uc1a = self . driver . list_volumes ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( volumes ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( len ( volumes_all ) , <NUM_LIT:10> ) <EOL> self . assertEqual ( len ( volumes_uc1a ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( volumes [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( volumes_uc1a [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> names = [ v . name for v in volumes_all ] <EOL> self . assertTrue ( '<STR_LIT>' in names ) <EOL> def test_ex_list_zones ( self ) : <EOL> zones = self . driver . ex_list_zones ( ) <EOL> self . assertEqual ( len ( zones ) , <NUM_LIT:6> ) <EOL> self . assertEqual ( zones [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_create_address_global ( self ) : <EOL> address_name = '<STR_LIT>' <EOL> address = self . driver . ex_create_address ( address_name , '<STR_LIT>' ) <EOL> self . assertTrue ( isinstance ( address , GCEAddress ) ) <EOL> self . assertEqual ( address . name , address_name ) <EOL> self . assertEqual ( address . region , '<STR_LIT>' ) <EOL> def test_ex_create_address ( self ) : <EOL> address_name = '<STR_LIT>' <EOL> address = self . driver . ex_create_address ( address_name ) <EOL> self . assertTrue ( isinstance ( address , GCEAddress ) ) <EOL> self . assertEqual ( address . name , address_name ) <EOL> def test_ex_create_backendservice ( self ) : <EOL> backendservice_name = '<STR_LIT>' <EOL> backendservice = self . driver . ex_create_backendservice ( <EOL> name = backendservice_name , <EOL> healthchecks = [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( isinstance ( backendservice , GCEBackendService ) ) <EOL> self . assertEqual ( backendservice . name , backendservice_name ) <EOL> def test_ex_create_healthcheck ( self ) : <EOL> healthcheck_name = '<STR_LIT>' <EOL> kwargs = { '<STR_LIT:host>' : '<STR_LIT>' , <EOL> '<STR_LIT:path>' : '<STR_LIT>' , <EOL> '<STR_LIT:port>' : <NUM_LIT> , <EOL> '<STR_LIT>' : <NUM_LIT:10> , <EOL> '<STR_LIT>' : <NUM_LIT:10> , <EOL> '<STR_LIT>' : <NUM_LIT:4> , <EOL> '<STR_LIT>' : <NUM_LIT:3> , <EOL> '<STR_LIT:description>' : '<STR_LIT>' } <EOL> hc = self . driver . ex_create_healthcheck ( healthcheck_name , ** kwargs ) <EOL> self . assertTrue ( isinstance ( hc , GCEHealthCheck ) ) <EOL> self . assertEqual ( hc . name , healthcheck_name ) <EOL> self . assertEqual ( hc . path , '<STR_LIT>' ) <EOL> self . assertEqual ( hc . port , <NUM_LIT> ) <EOL> self . assertEqual ( hc . interval , <NUM_LIT:10> ) <EOL> self . assertEqual ( hc . extra [ '<STR_LIT:host>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( hc . extra [ '<STR_LIT:description>' ] , '<STR_LIT>' ) <EOL> def test_ex_create_image ( self ) : <EOL> volume = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> image = self . driver . ex_create_image ( '<STR_LIT>' , volume ) <EOL> self . assertTrue ( isinstance ( image , GCENodeImage ) ) <EOL> self . assertTrue ( image . name . startswith ( '<STR_LIT>' ) ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT:description>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_ex_create_firewall ( self ) : <EOL> firewall_name = '<STR_LIT>' <EOL> allowed = [ { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : [ '<STR_LIT>' ] } ] <EOL> source_tags = [ '<STR_LIT>' ] <EOL> firewall = self . driver . ex_create_firewall ( firewall_name , allowed , <EOL> source_tags = source_tags ) <EOL> self . assertTrue ( isinstance ( firewall , GCEFirewall ) ) <EOL> self . assertEqual ( firewall . name , firewall_name ) <EOL> def test_ex_create_forwarding_rule ( self ) : <EOL> fwr_name = '<STR_LIT>' <EOL> targetpool = '<STR_LIT>' <EOL> region = '<STR_LIT>' <EOL> address = '<STR_LIT>' <EOL> port_range = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> fwr = self . driver . ex_create_forwarding_rule ( fwr_name , targetpool , <EOL> region = region , <EOL> address = address , <EOL> port_range = port_range , <EOL> description = description ) <EOL> self . assertTrue ( isinstance ( fwr , GCEForwardingRule ) ) <EOL> self . assertEqual ( fwr . name , fwr_name ) <EOL> self . assertEqual ( fwr . region . name , region ) <EOL> self . assertEqual ( fwr . protocol , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT>' ] , port_range ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT:description>' ] , description ) <EOL> def test_ex_create_forwarding_rule_global ( self ) : <EOL> fwr_name = '<STR_LIT>' <EOL> target_name = '<STR_LIT>' <EOL> address = '<STR_LIT>' <EOL> port_range = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> for target in ( target_name , <EOL> self . driver . ex_get_targethttpproxy ( target_name ) ) : <EOL> fwr = self . driver . ex_create_forwarding_rule ( fwr_name , target , <EOL> global_rule = True , <EOL> address = address , <EOL> port_range = port_range , <EOL> description = description ) <EOL> self . assertTrue ( isinstance ( fwr , GCEForwardingRule ) ) <EOL> self . assertEqual ( fwr . name , fwr_name ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT>' ] , port_range ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT:description>' ] , description ) <EOL> def test_ex_create_forwarding_rule_targetpool_keyword ( self ) : <EOL> """<STR_LIT>""" <EOL> fwr_name = '<STR_LIT>' <EOL> targetpool = '<STR_LIT>' <EOL> region = '<STR_LIT>' <EOL> address = self . driver . ex_get_address ( '<STR_LIT>' ) <EOL> port_range = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> fwr = self . driver . ex_create_forwarding_rule ( fwr_name , <EOL> targetpool = targetpool , <EOL> region = region , <EOL> address = address , <EOL> port_range = port_range , <EOL> description = description ) <EOL> self . assertTrue ( isinstance ( fwr , GCEForwardingRule ) ) <EOL> self . assertEqual ( fwr . name , fwr_name ) <EOL> self . assertEqual ( fwr . region . name , region ) <EOL> self . assertEqual ( fwr . protocol , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT>' ] , port_range ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT:description>' ] , description ) <EOL> def test_ex_create_route ( self ) : <EOL> route_name = '<STR_LIT>' <EOL> dest_range = '<STR_LIT>' <EOL> priority = <NUM_LIT:1000> <EOL> route = self . driver . ex_create_route ( route_name , dest_range ) <EOL> self . assertTrue ( isinstance ( route , GCERoute ) ) <EOL> self . assertEqual ( route . name , route_name ) <EOL> self . assertEqual ( route . priority , priority ) <EOL> self . assertTrue ( "<STR_LIT>" in route . tags ) <EOL> self . assertTrue ( route . extra [ '<STR_LIT>' ] . endswith ( '<STR_LIT>' ) ) <EOL> self . assertEqual ( route . dest_range , dest_range ) <EOL> def test_ex_create_network ( self ) : <EOL> network_name = '<STR_LIT>' <EOL> cidr = '<STR_LIT>' <EOL> network = self . driver . ex_create_network ( network_name , cidr ) <EOL> self . assertTrue ( isinstance ( network , GCENetwork ) ) <EOL> self . assertEqual ( network . name , network_name ) <EOL> self . assertEqual ( network . cidr , cidr ) <EOL> def test_ex_set_machine_type_notstopped ( self ) : <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertRaises ( GoogleBaseError , self . driver . ex_set_machine_type , <EOL> node , '<STR_LIT>' ) <EOL> def test_ex_set_machine_type_invalid ( self ) : <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertRaises ( InvalidRequestError , self . driver . ex_set_machine_type , <EOL> node , '<STR_LIT>' ) <EOL> def test_ex_set_machine_type ( self ) : <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertEqual ( node . size , '<STR_LIT>' ) <EOL> self . assertEqual ( node . extra [ '<STR_LIT:status>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( self . driver . ex_set_machine_type ( node , '<STR_LIT>' ) ) <EOL> def test_ex_node_start ( self ) : <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertTrue ( self . driver . ex_start_node ( node ) ) <EOL> def test_ex_node_stop ( self ) : <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertTrue ( self . driver . ex_stop_node ( node ) ) <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> self . assertTrue ( self . driver . ex_stop_node ( node ) ) <EOL> def test_create_node_req ( self ) : <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> location = self . driver . zone <EOL> network = self . driver . ex_get_network ( '<STR_LIT:default>' ) <EOL> tags = [ '<STR_LIT>' ] <EOL> metadata = [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] <EOL> boot_disk = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> node_request , node_data = self . driver . _create_node_req ( '<STR_LIT>' , size , <EOL> image , location , <EOL> network , tags , <EOL> metadata , <EOL> boot_disk ) <EOL> self . assertEqual ( node_request , '<STR_LIT>' % location . name ) <EOL> self . assertEqual ( node_data [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( node_data [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] , '<STR_LIT>' ) <EOL> self . assertEqual ( node_data [ '<STR_LIT:name>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] , list ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] , dict ) <EOL> self . assertEqual ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:email>' ] , '<STR_LIT:default>' ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , list ) <EOL> self . assertEqual ( len ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> def test_create_node_network_opts ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> zone = self . driver . ex_get_zone ( '<STR_LIT>' ) <EOL> network = self . driver . ex_get_network ( '<STR_LIT>' ) <EOL> address = self . driver . ex_get_address ( '<STR_LIT>' ) <EOL> ex_nic_gce_struct = [ <EOL> { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : [ <EOL> { <EOL> "<STR_LIT:name>" : "<STR_LIT>" , <EOL> "<STR_LIT:type>" : "<STR_LIT>" <EOL> } <EOL> ] <EOL> } <EOL> ] <EOL> node = self . driver . create_node ( node_name , size , image ) <EOL> self . assertEqual ( node . extra [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ "<STR_LIT:name>" ] , '<STR_LIT>' ) <EOL> node = self . driver . create_node ( node_name , size , image , location = zone , <EOL> ex_network = network ) <EOL> self . assertEqual ( node . extra [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ "<STR_LIT:name>" ] , '<STR_LIT>' ) <EOL> node = self . driver . create_node ( node_name , size , image , location = zone , <EOL> ex_nic_gce_struct = ex_nic_gce_struct ) <EOL> self . assertEqual ( node . extra [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ "<STR_LIT:name>" ] , '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . create_node , node_name , <EOL> size , image , location = zone , external_ip = address , <EOL> ex_nic_gce_struct = ex_nic_gce_struct ) <EOL> self . assertRaises ( ValueError , self . driver . create_node , node_name , <EOL> size , image , location = zone , ex_network = network , <EOL> ex_nic_gce_struct = ex_nic_gce_struct ) <EOL> def test_create_node_disk_opts ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> boot_disk = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> disk_type = self . driver . ex_get_disktype ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> DEMO_BASE_NAME = "<STR_LIT>" <EOL> gce_disk_struct = [ <EOL> { <EOL> "<STR_LIT:type>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : '<STR_LIT>' % DEMO_BASE_NAME , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : '<STR_LIT>' % DEMO_BASE_NAME , <EOL> "<STR_LIT>" : image . extra [ '<STR_LIT>' ] <EOL> } , <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : True <EOL> } , <EOL> { <EOL> "<STR_LIT:type>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : '<STR_LIT>' % DEMO_BASE_NAME , <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : disk_type . extra [ '<STR_LIT>' ] <EOL> } , <EOL> "<STR_LIT>" : True <EOL> } <EOL> ] <EOL> self . assertRaises ( ValueError , self . driver . create_node , node_name , <EOL> size , None ) <EOL> node = self . driver . create_node ( node_name , size , image ) <EOL> self . assertTrue ( isinstance ( node , Node ) ) <EOL> node = self . driver . create_node ( node_name , size , None , <EOL> ex_boot_disk = boot_disk ) <EOL> self . assertTrue ( isinstance ( node , Node ) ) <EOL> node = self . driver . create_node ( node_name , size , None , <EOL> ex_disks_gce_struct = gce_disk_struct ) <EOL> self . assertTrue ( isinstance ( node , Node ) ) <EOL> self . assertRaises ( ValueError , self . driver . create_node , node_name , <EOL> size , None , ex_boot_disk = boot_disk , <EOL> ex_disks_gce_struct = gce_disk_struct ) <EOL> def test_create_node ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> node = self . driver . create_node ( node_name , size , image ) <EOL> self . assertTrue ( isinstance ( node , Node ) ) <EOL> self . assertEqual ( node . name , node_name ) <EOL> def test_create_node_image_family ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> node = self . driver . create_node ( node_name , size , image = None , <EOL> ex_image_family = '<STR_LIT>' ) <EOL> self . assertTrue ( isinstance ( node , Node ) ) <EOL> self . assertEqual ( node . name , node_name ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . create_node , node_name , <EOL> size , image , ex_image_family = '<STR_LIT>' ) <EOL> def test_create_node_req_with_serviceaccounts ( self ) : <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> location = self . driver . zone <EOL> network = self . driver . ex_get_network ( '<STR_LIT:default>' ) <EOL> ex_sa = [ { '<STR_LIT>' : [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] } ] <EOL> node_request , node_data = self . driver . _create_node_req ( '<STR_LIT>' , size , <EOL> image , location , <EOL> network , <EOL> ex_service_accounts = ex_sa ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] , list ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] , dict ) <EOL> self . assertEqual ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:email>' ] , '<STR_LIT:default>' ) <EOL> self . assertIsInstance ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , list ) <EOL> self . assertEqual ( len ( node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) , <NUM_LIT:3> ) <EOL> self . assertTrue ( '<STR_LIT>' <EOL> in node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( '<STR_LIT>' <EOL> in node_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) <EOL> def test_format_metadata ( self ) : <EOL> in_md = [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } , { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> in_md = [ { '<STR_LIT>' : '<STR_LIT>' } , { '<STR_LIT>' : '<STR_LIT>' } ] <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> in_md = { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:1> , out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] , '<STR_LIT>' ) <EOL> in_md = { '<STR_LIT>' : '<STR_LIT>' } <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] , '<STR_LIT>' ) <EOL> in_md = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:3> ) <EOL> keys = [ x [ '<STR_LIT:key>' ] for x in out_md [ '<STR_LIT>' ] ] <EOL> vals = [ x [ '<STR_LIT:value>' ] for x in out_md [ '<STR_LIT>' ] ] <EOL> keys . sort ( ) <EOL> vals . sort ( ) <EOL> self . assertEqual ( keys , [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> self . assertEqual ( vals , [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> in_md = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> out_md = self . driver . _format_metadata ( '<STR_LIT>' , in_md ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( out_md [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in out_md ) <EOL> self . assertEqual ( len ( out_md [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> self . assertTrue ( out_md [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] in [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> in_md = { '<STR_LIT>' : '<STR_LIT:foo>' } <EOL> self . assertRaises ( ValueError , self . driver . _format_metadata , '<STR_LIT>' , in_md ) <EOL> in_md = { '<STR_LIT>' : { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } } <EOL> self . assertRaises ( ValueError , self . driver . _format_metadata , '<STR_LIT>' , in_md ) <EOL> in_md = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . assertRaises ( ValueError , self . driver . _format_metadata , '<STR_LIT>' , in_md ) <EOL> def test_create_node_with_metadata ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> zone = self . driver . ex_get_zone ( '<STR_LIT>' ) <EOL> md = [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } , { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] <EOL> request , data = self . driver . _create_node_req ( node_name , size , image , <EOL> zone , metadata = md ) <EOL> self . assertTrue ( '<STR_LIT>' in data [ '<STR_LIT>' ] ) <EOL> self . assertEqual ( len ( data [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> md = { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } <EOL> request , data = self . driver . _create_node_req ( node_name , size , image , <EOL> zone , metadata = md ) <EOL> self . assertTrue ( '<STR_LIT>' in data [ '<STR_LIT>' ] ) <EOL> self . assertEqual ( len ( data [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> md = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> request , data = self . driver . _create_node_req ( node_name , size , image , <EOL> zone , metadata = md ) <EOL> self . assertTrue ( '<STR_LIT>' in data [ '<STR_LIT>' ] ) <EOL> self . assertEqual ( len ( data [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( data [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( data [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] , '<STR_LIT>' ) <EOL> def test_create_node_existing ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' , zone = '<STR_LIT>' ) <EOL> self . assertRaises ( ResourceExistsError , self . driver . create_node , <EOL> node_name , size , image , location = '<STR_LIT>' ) <EOL> def test_ex_create_multiple_nodes ( self ) : <EOL> base_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> number = <NUM_LIT:2> <EOL> nodes = self . driver . ex_create_multiple_nodes ( base_name , size , image , <EOL> number ) <EOL> self . assertEqual ( len ( nodes ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( isinstance ( nodes [ <NUM_LIT:0> ] , Node ) ) <EOL> self . assertTrue ( isinstance ( nodes [ <NUM_LIT:1> ] , Node ) ) <EOL> self . assertEqual ( nodes [ <NUM_LIT:0> ] . name , '<STR_LIT>' % base_name ) <EOL> self . assertEqual ( nodes [ <NUM_LIT:1> ] . name , '<STR_LIT>' % base_name ) <EOL> def test_ex_create_multiple_nodes_image_family ( self ) : <EOL> base_name = '<STR_LIT>' <EOL> image = None <EOL> size = self . driver . ex_get_size ( '<STR_LIT>' ) <EOL> number = <NUM_LIT:2> <EOL> nodes = self . driver . ex_create_multiple_nodes ( base_name , size , image , <EOL> number , ex_image_family = '<STR_LIT>' ) <EOL> self . assertEqual ( len ( nodes ) , <NUM_LIT:2> ) <EOL> self . assertTrue ( isinstance ( nodes [ <NUM_LIT:0> ] , Node ) ) <EOL> self . assertTrue ( isinstance ( nodes [ <NUM_LIT:1> ] , Node ) ) <EOL> self . assertEqual ( nodes [ <NUM_LIT:0> ] . name , '<STR_LIT>' % base_name ) <EOL> self . assertEqual ( nodes [ <NUM_LIT:1> ] . name , '<STR_LIT>' % base_name ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . ex_create_multiple_nodes , <EOL> base_name , size , image , number , ex_image_family = '<STR_LIT>' ) <EOL> def test_ex_create_targethttpproxy ( self ) : <EOL> proxy_name = '<STR_LIT>' <EOL> urlmap_name = '<STR_LIT>' <EOL> for urlmap in ( urlmap_name , self . driver . ex_get_urlmap ( urlmap_name ) ) : <EOL> proxy = self . driver . ex_create_targethttpproxy ( proxy_name , urlmap ) <EOL> self . assertTrue ( isinstance ( proxy , GCETargetHttpProxy ) ) <EOL> self . assertEqual ( proxy_name , proxy . name ) <EOL> def test_ex_create_targetinstance ( self ) : <EOL> targetinstance_name = '<STR_LIT>' <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , zone ) <EOL> targetinstance = self . driver . ex_create_targetinstance ( <EOL> targetinstance_name , zone = zone , node = node ) <EOL> self . assertEqual ( targetinstance . name , targetinstance_name ) <EOL> self . assertEqual ( targetinstance . zone . name , zone ) <EOL> def test_ex_create_targetpool ( self ) : <EOL> targetpool_name = '<STR_LIT>' <EOL> region = '<STR_LIT>' <EOL> healthchecks = [ '<STR_LIT>' ] <EOL> node1 = self . driver . ex_get_node ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> node2 = self . driver . ex_get_node ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> nodes = [ node1 , node2 ] <EOL> targetpool = self . driver . ex_create_targetpool ( <EOL> targetpool_name , region = region , healthchecks = healthchecks , <EOL> nodes = nodes ) <EOL> self . assertEqual ( targetpool . name , targetpool_name ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , len ( nodes ) ) <EOL> self . assertEqual ( targetpool . region . name , region ) <EOL> def test_ex_create_targetpool_session_affinity ( self ) : <EOL> targetpool_name = '<STR_LIT>' <EOL> region = '<STR_LIT>' <EOL> session_affinity = '<STR_LIT>' <EOL> targetpool = self . driver . ex_create_targetpool ( <EOL> targetpool_name , region = region , <EOL> session_affinity = session_affinity ) <EOL> self . assertEqual ( targetpool . name , targetpool_name ) <EOL> self . assertEqual ( targetpool . extra . get ( '<STR_LIT>' ) , <EOL> session_affinity ) <EOL> def test_ex_create_urlmap ( self ) : <EOL> urlmap_name = '<STR_LIT>' <EOL> for service in ( '<STR_LIT>' , <EOL> self . driver . ex_get_backendservice ( '<STR_LIT>' ) ) : <EOL> urlmap = self . driver . ex_create_urlmap ( urlmap_name , service ) <EOL> self . assertTrue ( isinstance ( urlmap , GCEUrlMap ) ) <EOL> self . assertEqual ( urlmap_name , urlmap . name ) <EOL> def test_create_volume_image_family ( self ) : <EOL> volume_name = '<STR_LIT>' <EOL> size = <NUM_LIT:10> <EOL> volume = self . driver . create_volume ( size , volume_name , <EOL> ex_image_family = '<STR_LIT>' ) <EOL> self . assertTrue ( isinstance ( volume , StorageVolume ) ) <EOL> self . assertEqual ( volume . name , volume_name ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . create_volume , size , <EOL> volume_name , image = image , <EOL> ex_image_family = '<STR_LIT>' ) <EOL> def test_ex_create_volume_snapshot ( self ) : <EOL> snapshot_name = '<STR_LIT>' <EOL> volume = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> snapshot = volume . snapshot ( snapshot_name ) <EOL> self . assertEqual ( snapshot . name , snapshot_name ) <EOL> self . assertEqual ( snapshot . size , '<STR_LIT>' ) <EOL> def test_create_volume_ssd ( self ) : <EOL> volume_name = '<STR_LIT>' <EOL> size = <NUM_LIT:10> <EOL> volume = self . driver . create_volume ( size , volume_name , <EOL> ex_disk_type = '<STR_LIT>' ) <EOL> self . assertTrue ( isinstance ( volume , StorageVolume ) ) <EOL> self . assertEqual ( volume . extra [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> def test_create_volume ( self ) : <EOL> volume_name = '<STR_LIT>' <EOL> size = <NUM_LIT:10> <EOL> volume = self . driver . create_volume ( size , volume_name ) <EOL> self . assertTrue ( isinstance ( volume , StorageVolume ) ) <EOL> self . assertEqual ( volume . name , volume_name ) <EOL> def test_ex_update_healthcheck ( self ) : <EOL> healthcheck_name = '<STR_LIT>' <EOL> healthcheck = self . driver . ex_get_healthcheck ( healthcheck_name ) <EOL> healthcheck . port = <NUM_LIT> <EOL> healthcheck2 = self . driver . ex_update_healthcheck ( healthcheck ) <EOL> self . assertTrue ( isinstance ( healthcheck2 , GCEHealthCheck ) ) <EOL> def test_ex_update_firewall ( self ) : <EOL> firewall_name = '<STR_LIT>' <EOL> firewall = self . driver . ex_get_firewall ( firewall_name ) <EOL> firewall . source_ranges = [ '<STR_LIT>' ] <EOL> firewall . source_tags = [ '<STR_LIT>' , '<STR_LIT:test>' ] <EOL> firewall2 = self . driver . ex_update_firewall ( firewall ) <EOL> self . assertTrue ( isinstance ( firewall2 , GCEFirewall ) ) <EOL> def test_ex_targetpool_gethealth ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> health = targetpool . get_health ( '<STR_LIT>' ) <EOL> self . assertEqual ( len ( health ) , <NUM_LIT:1> ) <EOL> self . assertTrue ( '<STR_LIT>' in health [ <NUM_LIT:0> ] ) <EOL> self . assertTrue ( '<STR_LIT>' in health [ <NUM_LIT:0> ] ) <EOL> self . assertEqual ( health [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_ex_targetpool_with_backup_pool ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in targetpool . extra ) <EOL> self . assertTrue ( '<STR_LIT>' in targetpool . extra ) <EOL> def test_ex_targetpool_setbackup ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> backup_targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> self . assertTrue ( targetpool . set_backup_targetpool ( backup_targetpool , <EOL> <NUM_LIT:0.1> ) ) <EOL> def test_ex_targetpool_remove_add_node ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> remove_node = self . driver . ex_targetpool_remove_node ( targetpool , node ) <EOL> self . assertTrue ( remove_node ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:1> ) <EOL> add_node = self . driver . ex_targetpool_add_node ( targetpool , node . extra [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( add_node ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:2> ) <EOL> remove_node = self . driver . ex_targetpool_remove_node ( targetpool , node . extra [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( remove_node ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:1> ) <EOL> add_node = self . driver . ex_targetpool_add_node ( targetpool , node ) <EOL> self . assertTrue ( add_node ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:2> ) <EOL> add_node = self . driver . ex_targetpool_add_node ( targetpool , node . extra [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( add_node ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:2> ) <EOL> def test_ex_targetpool_remove_add_healthcheck ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> healthcheck = self . driver . ex_get_healthcheck ( <EOL> '<STR_LIT>' ) <EOL> remove_healthcheck = self . driver . ex_targetpool_remove_healthcheck ( <EOL> targetpool , healthcheck ) <EOL> self . assertTrue ( remove_healthcheck ) <EOL> self . assertEqual ( len ( targetpool . healthchecks ) , <NUM_LIT:0> ) <EOL> add_healthcheck = self . driver . ex_targetpool_add_healthcheck ( <EOL> targetpool , healthcheck ) <EOL> self . assertTrue ( add_healthcheck ) <EOL> self . assertEqual ( len ( targetpool . healthchecks ) , <NUM_LIT:1> ) <EOL> def test_reboot_node ( self ) : <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> reboot = self . driver . reboot_node ( node ) <EOL> self . assertTrue ( reboot ) <EOL> def test_ex_set_node_tags ( self ) : <EOL> new_tags = [ '<STR_LIT>' ] <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> set_tags = self . driver . ex_set_node_tags ( node , new_tags ) <EOL> self . assertTrue ( set_tags ) <EOL> def test_attach_volume_invalid_usecase ( self ) : <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . attach_volume , node , None ) <EOL> self . assertRaises ( ValueError , self . driver . attach_volume , node , None , <EOL> ex_source = '<STR_LIT>' , device = None ) <EOL> def test_attach_volume ( self ) : <EOL> volume = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> attach = volume . attach ( node ) <EOL> self . assertTrue ( attach ) <EOL> def test_detach_volume ( self ) : <EOL> volume = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> detach = volume . detach ( ) <EOL> self . assertFalse ( detach ) <EOL> detach = self . driver . detach_volume ( volume , node ) <EOL> self . assertTrue ( detach ) <EOL> def test_ex_destroy_address_global ( self ) : <EOL> address = self . driver . ex_get_address ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( address . name , '<STR_LIT>' ) <EOL> self . assertEqual ( address . region , '<STR_LIT>' ) <EOL> destroyed = address . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_address ( self ) : <EOL> address = self . driver . ex_get_address ( '<STR_LIT>' ) <EOL> destroyed = address . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_backendservice ( self ) : <EOL> backendservice = self . driver . ex_get_backendservice ( '<STR_LIT>' ) <EOL> destroyed = backendservice . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_healthcheck ( self ) : <EOL> hc = self . driver . ex_get_healthcheck ( '<STR_LIT>' ) <EOL> destroyed = hc . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_delete_image ( self ) : <EOL> self . assertRaises ( ResourceNotFoundError , <EOL> self . driver . ex_get_image , '<STR_LIT>' ) <EOL> self . assertRaises ( ResourceNotFoundError , <EOL> self . driver . ex_delete_image , '<STR_LIT>' ) <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> deleted = self . driver . ex_delete_image ( image ) <EOL> self . assertTrue ( deleted ) <EOL> def test_ex_deprecate_image ( self ) : <EOL> dep_ts = '<STR_LIT>' <EOL> obs_ts = '<STR_LIT>' <EOL> del_ts = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> deprecated = image . deprecate ( '<STR_LIT>' , '<STR_LIT>' , <EOL> deprecated = dep_ts , <EOL> obsolete = obs_ts , <EOL> deleted = del_ts ) <EOL> self . assertTrue ( deprecated ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] [ '<STR_LIT>' ] , dep_ts ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] [ '<STR_LIT>' ] , obs_ts ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] [ '<STR_LIT>' ] , del_ts ) <EOL> def test_ex_destroy_firewall ( self ) : <EOL> firewall = self . driver . ex_get_firewall ( '<STR_LIT>' ) <EOL> destroyed = firewall . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_forwarding_rule ( self ) : <EOL> fwr = self . driver . ex_get_forwarding_rule ( '<STR_LIT>' ) <EOL> destroyed = fwr . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_forwarding_rule_global ( self ) : <EOL> fwr = self . driver . ex_get_forwarding_rule ( '<STR_LIT>' , global_rule = True ) <EOL> destroyed = fwr . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_route ( self ) : <EOL> route = self . driver . ex_get_route ( '<STR_LIT>' ) <EOL> destroyed = route . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_network ( self ) : <EOL> network = self . driver . ex_get_network ( '<STR_LIT>' ) <EOL> destroyed = network . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_destroy_node ( self ) : <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> destroyed = node . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_destroy_multiple_nodes ( self ) : <EOL> nodes = [ ] <EOL> nodes . append ( self . driver . ex_get_node ( '<STR_LIT>' ) ) <EOL> nodes . append ( self . driver . ex_get_node ( '<STR_LIT>' ) ) <EOL> destroyed = self . driver . ex_destroy_multiple_nodes ( nodes ) <EOL> for d in destroyed : <EOL> self . assertTrue ( d ) <EOL> def test_destroy_targethttpproxy ( self ) : <EOL> proxy = self . driver . ex_get_targethttpproxy ( '<STR_LIT>' ) <EOL> destroyed = proxy . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_destroy_targetinstance ( self ) : <EOL> targetinstance = self . driver . ex_get_targetinstance ( '<STR_LIT>' ) <EOL> self . assertEqual ( targetinstance . name , '<STR_LIT>' ) <EOL> destroyed = targetinstance . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_destroy_targetpool ( self ) : <EOL> targetpool = self . driver . ex_get_targetpool ( '<STR_LIT>' ) <EOL> destroyed = targetpool . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_destroy_urlmap ( self ) : <EOL> urlmap = self . driver . ex_get_urlmap ( '<STR_LIT>' ) <EOL> destroyed = urlmap . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_destroy_volume ( self ) : <EOL> disk = self . driver . ex_get_volume ( '<STR_LIT>' ) <EOL> destroyed = disk . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_set_volume_auto_delete ( self ) : <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' ) <EOL> volume = node . extra [ '<STR_LIT>' ] <EOL> auto_delete = self . driver . ex_set_volume_auto_delete ( <EOL> volume , node ) <EOL> self . assertTrue ( auto_delete ) <EOL> def test_destroy_volume_snapshot ( self ) : <EOL> snapshot = self . driver . ex_get_snapshot ( '<STR_LIT>' ) <EOL> destroyed = snapshot . destroy ( ) <EOL> self . assertTrue ( destroyed ) <EOL> def test_ex_get_address_global ( self ) : <EOL> address_name = '<STR_LIT>' <EOL> address = self . driver . ex_get_address ( address_name , '<STR_LIT>' ) <EOL> self . assertEqual ( address . name , address_name ) <EOL> self . assertEqual ( address . address , '<STR_LIT>' ) <EOL> self . assertEqual ( address . region , '<STR_LIT>' ) <EOL> self . assertEqual ( address . extra [ '<STR_LIT:status>' ] , '<STR_LIT>' ) <EOL> def test_ex_get_address ( self ) : <EOL> address_name = '<STR_LIT>' <EOL> address = self . driver . ex_get_address ( address_name ) <EOL> self . assertEqual ( address . name , address_name ) <EOL> self . assertEqual ( address . address , '<STR_LIT>' ) <EOL> self . assertEqual ( address . region . name , '<STR_LIT>' ) <EOL> self . assertEqual ( address . extra [ '<STR_LIT:status>' ] , '<STR_LIT>' ) <EOL> def test_ex_get_backendservice ( self ) : <EOL> web_service = self . driver . ex_get_backendservice ( '<STR_LIT>' ) <EOL> self . assertEqual ( web_service . name , '<STR_LIT>' ) <EOL> self . assertEqual ( web_service . protocol , '<STR_LIT>' ) <EOL> self . assertEqual ( web_service . port , <NUM_LIT> ) <EOL> self . assertEqual ( web_service . timeout , <NUM_LIT:30> ) <EOL> self . assertEqual ( web_service . healthchecks [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( web_service . healthchecks ) , <NUM_LIT:1> ) <EOL> backends = web_service . backends <EOL> self . assertEqual ( len ( backends ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( backends [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( backends [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , <NUM_LIT:100> ) <EOL> self . assertEqual ( backends [ <NUM_LIT:0> ] [ '<STR_LIT>' ] , <NUM_LIT:1.0> ) <EOL> web_service = self . driver . ex_get_backendservice ( '<STR_LIT>' ) <EOL> self . assertEqual ( web_service . name , '<STR_LIT>' ) <EOL> self . assertEqual ( web_service . healthchecks [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( web_service . healthchecks ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( len ( web_service . backends ) , <NUM_LIT:0> ) <EOL> def test_ex_get_healthcheck ( self ) : <EOL> healthcheck_name = '<STR_LIT>' <EOL> healthcheck = self . driver . ex_get_healthcheck ( healthcheck_name ) <EOL> self . assertEqual ( healthcheck . name , healthcheck_name ) <EOL> self . assertEqual ( healthcheck . port , <NUM_LIT> ) <EOL> self . assertEqual ( healthcheck . path , '<STR_LIT>' ) <EOL> def test_ex_get_firewall ( self ) : <EOL> firewall_name = '<STR_LIT>' <EOL> firewall = self . driver . ex_get_firewall ( firewall_name ) <EOL> self . assertEqual ( firewall . name , firewall_name ) <EOL> self . assertEqual ( firewall . network . name , '<STR_LIT:default>' ) <EOL> self . assertEqual ( firewall . source_tags , [ '<STR_LIT>' ] ) <EOL> def test_ex_get_forwarding_rule ( self ) : <EOL> fwr_name = '<STR_LIT>' <EOL> fwr = self . driver . ex_get_forwarding_rule ( fwr_name ) <EOL> self . assertEqual ( fwr . name , fwr_name ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . targetpool . name , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . protocol , '<STR_LIT>' ) <EOL> def test_ex_get_forwarding_rule_global ( self ) : <EOL> fwr_name = '<STR_LIT>' <EOL> fwr = self . driver . ex_get_forwarding_rule ( fwr_name , global_rule = True ) <EOL> self . assertEqual ( fwr . name , fwr_name ) <EOL> self . assertEqual ( fwr . extra [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . targetpool . name , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . protocol , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . address , '<STR_LIT>' ) <EOL> self . assertEqual ( fwr . targetpool . name , '<STR_LIT>' ) <EOL> def test_ex_get_image_license ( self ) : <EOL> image = self . driver . ex_get_image ( '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in image . extra ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> self . assertTrue ( image . extra [ '<STR_LIT>' ] [ <NUM_LIT:0> ] . charges_use_fee ) <EOL> def test_ex_get_image ( self ) : <EOL> partial_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( partial_name ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> self . assertTrue ( image . extra [ '<STR_LIT:description>' ] . startswith ( '<STR_LIT>' ) ) <EOL> partial_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( partial_name ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> self . assertTrue ( image . extra [ '<STR_LIT:description>' ] . startswith ( '<STR_LIT>' ) ) <EOL> partial_name = '<STR_LIT>' <EOL> image = self . driver . ex_get_image ( partial_name , [ '<STR_LIT>' ] ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> partial_name = '<STR_LIT>' <EOL> self . assertRaises ( ResourceNotFoundError , self . driver . ex_get_image , <EOL> partial_name , '<STR_LIT>' , <EOL> ex_standard_projects = False ) <EOL> def test_ex_get_image_from_family ( self ) : <EOL> family = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> image = self . driver . ex_get_image_from_family ( family ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT:description>' ] , description ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] , family ) <EOL> url = ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> image = self . driver . ex_get_image_from_family ( url ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT:description>' ] , description ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] , family ) <EOL> project_list = [ '<STR_LIT>' ] <EOL> image = self . driver . ex_get_image_from_family ( family , ex_project_list = project_list , ex_standard_projects = False ) <EOL> self . assertEqual ( image . name , '<STR_LIT>' ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT:description>' ] , description ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] , family ) <EOL> self . assertRaises ( ResourceNotFoundError , self . driver . ex_get_image_from_family , '<STR_LIT>' ) <EOL> def test_ex_copy_image ( self ) : <EOL> name = '<STR_LIT>' <EOL> url = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> family = '<STR_LIT>' <EOL> image = self . driver . ex_copy_image ( name , url , description = description , <EOL> family = family ) <EOL> self . assertTrue ( image . name . startswith ( name ) ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT:description>' ] , description ) <EOL> self . assertEqual ( image . extra [ '<STR_LIT>' ] , family ) <EOL> def test_ex_get_route ( self ) : <EOL> route_name = '<STR_LIT>' <EOL> route = self . driver . ex_get_route ( route_name ) <EOL> self . assertEqual ( route . name , route_name ) <EOL> self . assertEqual ( route . dest_range , '<STR_LIT>' ) <EOL> self . assertEqual ( route . priority , <NUM_LIT:1000> ) <EOL> def test_ex_get_network ( self ) : <EOL> network_name = '<STR_LIT>' <EOL> network = self . driver . ex_get_network ( network_name ) <EOL> self . assertEqual ( network . name , network_name ) <EOL> self . assertEqual ( network . cidr , '<STR_LIT>' ) <EOL> self . assertEqual ( network . extra [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( network . extra [ '<STR_LIT:description>' ] , '<STR_LIT>' ) <EOL> def test_ex_get_node ( self ) : <EOL> node_name = '<STR_LIT>' <EOL> zone = '<STR_LIT>' <EOL> node = self . driver . ex_get_node ( node_name , zone ) <EOL> self . assertEqual ( node . name , node_name ) <EOL> self . assertEqual ( node . size , '<STR_LIT>' ) <EOL> removed_node = '<STR_LIT>' <EOL> self . assertRaises ( ResourceNotFoundError , self . driver . ex_get_node , <EOL> removed_node , '<STR_LIT>' ) <EOL> missing_node = '<STR_LIT>' <EOL> self . assertRaises ( ResourceNotFoundError , self . driver . ex_get_node , <EOL> missing_node , '<STR_LIT:all>' ) <EOL> def test_ex_get_project ( self ) : <EOL> project = self . driver . ex_get_project ( ) <EOL> self . assertEqual ( project . name , '<STR_LIT>' ) <EOL> networks_quota = project . quotas [ <NUM_LIT:1> ] <EOL> self . assertEqual ( networks_quota [ '<STR_LIT>' ] , <NUM_LIT:3> ) <EOL> self . assertEqual ( networks_quota [ '<STR_LIT>' ] , <NUM_LIT:5> ) <EOL> self . assertEqual ( networks_quota [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertTrue ( '<STR_LIT>' in project . extra [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( '<STR_LIT>' in project . extra [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( '<STR_LIT>' in project . extra ) <EOL> self . assertTrue ( '<STR_LIT>' in project . extra [ '<STR_LIT>' ] ) <EOL> self . assertEqual ( project . extra [ '<STR_LIT>' ] [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> def test_ex_add_access_config ( self ) : <EOL> self . assertRaises ( ValueError , self . driver . ex_add_access_config , <EOL> '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertTrue ( self . driver . ex_add_access_config ( node , '<STR_LIT:foo>' , '<STR_LIT:bar>' ) ) <EOL> def test_ex_delete_access_config ( self ) : <EOL> self . assertRaises ( ValueError , self . driver . ex_add_access_config , <EOL> '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ) <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertTrue ( self . driver . ex_delete_access_config ( node , '<STR_LIT:foo>' , '<STR_LIT:bar>' ) ) <EOL> def test_ex_set_usage_export_bucket ( self ) : <EOL> self . assertRaises ( ValueError , <EOL> self . driver . ex_set_usage_export_bucket , '<STR_LIT:foo>' ) <EOL> bucket_name = '<STR_LIT>' <EOL> self . driver . ex_set_usage_export_bucket ( bucket_name ) <EOL> bucket_name = '<STR_LIT>' <EOL> self . driver . ex_set_usage_export_bucket ( bucket_name ) <EOL> def test__set_project_metadata ( self ) : <EOL> self . assertEqual ( len ( self . driver . _set_project_metadata ( None , False , "<STR_LIT>" ) ) , <NUM_LIT:0> ) <EOL> md = self . driver . _set_project_metadata ( None , False , "<STR_LIT>" ) <EOL> self . assertEqual ( len ( md ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( md [ <NUM_LIT:0> ] [ '<STR_LIT:key>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( md [ <NUM_LIT:0> ] [ '<STR_LIT:value>' ] , '<STR_LIT>' ) <EOL> md = self . driver . _set_project_metadata ( None , True , "<STR_LIT>" ) <EOL> self . assertEqual ( len ( md ) , <NUM_LIT:0> ) <EOL> gce_md = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT:foo>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> md = self . driver . _set_project_metadata ( gce_md , False , "<STR_LIT>" ) <EOL> self . assertEqual ( len ( md ) , <NUM_LIT:2> , str ( md ) ) <EOL> sshKeys = "<STR_LIT>" <EOL> count = <NUM_LIT:0> <EOL> for d in md : <EOL> if d [ '<STR_LIT:key>' ] == '<STR_LIT>' : <EOL> count += <NUM_LIT:1> <EOL> sshKeys = d [ '<STR_LIT:value>' ] <EOL> self . assertEqual ( sshKeys , '<STR_LIT>' ) <EOL> self . assertEqual ( count , <NUM_LIT:1> ) <EOL> gce_md = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT:foo>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> md = self . driver . _set_project_metadata ( gce_md , True , "<STR_LIT>" ) <EOL> self . assertEqual ( len ( md ) , <NUM_LIT:2> , str ( md ) ) <EOL> sshKeys = "<STR_LIT>" <EOL> count = <NUM_LIT:0> <EOL> for d in md : <EOL> if d [ '<STR_LIT:key>' ] == '<STR_LIT>' : <EOL> count += <NUM_LIT:1> <EOL> sshKeys = d [ '<STR_LIT:value>' ] <EOL> self . assertEqual ( sshKeys , '<STR_LIT>' ) <EOL> self . assertEqual ( count , <NUM_LIT:1> ) <EOL> gce_md = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT:foo>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> md = self . driver . _set_project_metadata ( gce_md , True , "<STR_LIT>" ) <EOL> self . assertEqual ( len ( md ) , <NUM_LIT:2> , str ( md ) ) <EOL> sshKeys = "<STR_LIT>" <EOL> count = <NUM_LIT:0> <EOL> for d in md : <EOL> if d [ '<STR_LIT:key>' ] == '<STR_LIT>' : <EOL> count += <NUM_LIT:1> <EOL> sshKeys = d [ '<STR_LIT:value>' ] <EOL> self . assertEqual ( sshKeys , '<STR_LIT>' ) <EOL> self . assertEqual ( count , <NUM_LIT:0> ) <EOL> def test_ex_set_common_instance_metadata ( self ) : <EOL> self . assertRaises ( ValueError , <EOL> self . driver . ex_set_common_instance_metadata , <EOL> [ '<STR_LIT>' , '<STR_LIT:type>' ] ) <EOL> pydict = { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : <NUM_LIT:1> } <EOL> self . driver . ex_set_common_instance_metadata ( pydict ) <EOL> bad_gcedict = { '<STR_LIT>' : '<STR_LIT:foo>' } <EOL> self . assertRaises ( ValueError , <EOL> self . driver . ex_set_common_instance_metadata , <EOL> bad_gcedict ) <EOL> gcedict = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> self . driver . ex_set_common_instance_metadata ( gcedict ) <EOL> def test_ex_set_node_metadata ( self ) : <EOL> node = self . driver . ex_get_node ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertRaises ( ValueError , self . driver . ex_set_node_metadata , <EOL> node , [ '<STR_LIT>' , '<STR_LIT:type>' ] ) <EOL> pydict = { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : <NUM_LIT:1> } <EOL> self . driver . ex_set_node_metadata ( node , pydict ) <EOL> bad_gcedict = { '<STR_LIT>' : '<STR_LIT:foo>' } <EOL> self . assertRaises ( ValueError , self . driver . ex_set_node_metadata , <EOL> node , bad_gcedict ) <EOL> gcedict = { '<STR_LIT>' : [ { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } , <EOL> { '<STR_LIT:key>' : '<STR_LIT>' , '<STR_LIT:value>' : '<STR_LIT>' } ] } <EOL> self . driver . ex_set_node_metadata ( node , gcedict ) <EOL> def test_ex_get_region ( self ) : <EOL> region_name = '<STR_LIT>' <EOL> region = self . driver . ex_get_region ( region_name ) <EOL> self . assertEqual ( region . name , region_name ) <EOL> self . assertEqual ( region . status , '<STR_LIT>' ) <EOL> self . assertEqual ( region . zones [ <NUM_LIT:0> ] . name , '<STR_LIT>' ) <EOL> def test_ex_get_size ( self ) : <EOL> size_name = '<STR_LIT>' <EOL> size = self . driver . ex_get_size ( size_name ) <EOL> self . assertEqual ( size . name , size_name ) <EOL> self . assertEqual ( size . extra [ '<STR_LIT>' ] . name , '<STR_LIT>' ) <EOL> self . assertEqual ( size . disk , <NUM_LIT:10> ) <EOL> self . assertEqual ( size . ram , <NUM_LIT> ) <EOL> self . assertEqual ( size . extra [ '<STR_LIT>' ] , <NUM_LIT:1> ) <EOL> def test_ex_get_targethttpproxy ( self ) : <EOL> targethttpproxy_name = '<STR_LIT>' <EOL> targethttpproxy = self . driver . ex_get_targethttpproxy ( <EOL> targethttpproxy_name ) <EOL> self . assertEqual ( targethttpproxy . name , targethttpproxy_name ) <EOL> self . assertEqual ( targethttpproxy . urlmap . name , '<STR_LIT>' ) <EOL> def test_ex_get_targetinstance ( self ) : <EOL> targetinstance_name = '<STR_LIT>' <EOL> targetinstance = self . driver . ex_get_targetinstance ( targetinstance_name ) <EOL> self . assertEqual ( targetinstance . name , targetinstance_name ) <EOL> self . assertEqual ( targetinstance . zone . name , '<STR_LIT>' ) <EOL> def test_ex_get_targetpool ( self ) : <EOL> targetpool_name = '<STR_LIT>' <EOL> targetpool = self . driver . ex_get_targetpool ( targetpool_name ) <EOL> self . assertEqual ( targetpool . name , targetpool_name ) <EOL> self . assertEqual ( len ( targetpool . nodes ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( targetpool . region . name , '<STR_LIT>' ) <EOL> def test_ex_get_snapshot ( self ) : <EOL> snapshot_name = '<STR_LIT>' <EOL> snapshot = self . driver . ex_get_snapshot ( snapshot_name ) <EOL> self . assertEqual ( snapshot . name , snapshot_name ) <EOL> self . assertEqual ( snapshot . size , '<STR_LIT>' ) <EOL> self . assertEqual ( snapshot . status , '<STR_LIT>' ) <EOL> def test_ex_get_urlmap ( self ) : <EOL> urlmap_name = '<STR_LIT>' <EOL> urlmap = self . driver . ex_get_urlmap ( urlmap_name ) <EOL> self . assertEqual ( urlmap . name , urlmap_name ) <EOL> self . assertEqual ( urlmap . default_service . name , '<STR_LIT>' ) <EOL> def test_ex_get_volume ( self ) : <EOL> volume_name = '<STR_LIT>' <EOL> volume = self . driver . ex_get_volume ( volume_name ) <EOL> self . assertEqual ( volume . name , volume_name ) <EOL> self . assertEqual ( volume . size , '<STR_LIT>' ) <EOL> self . assertEqual ( volume . extra [ '<STR_LIT:status>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( volume . extra [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> def test_ex_get_disktype ( self ) : <EOL> disktype_name = '<STR_LIT>' <EOL> disktype_zone = '<STR_LIT>' <EOL> disktype = self . driver . ex_get_disktype ( disktype_name , disktype_zone ) <EOL> self . assertEqual ( disktype . name , disktype_name ) <EOL> self . assertEqual ( disktype . zone . name , disktype_zone ) <EOL> self . assertEqual ( disktype . extra [ '<STR_LIT:description>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( disktype . extra [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( disktype . extra [ '<STR_LIT>' ] , '<STR_LIT:100>' ) <EOL> def test_ex_get_zone ( self ) : <EOL> zone_name = '<STR_LIT>' <EOL> zone = self . driver . ex_get_zone ( zone_name ) <EOL> self . assertEqual ( zone . name , zone_name ) <EOL> self . assertFalse ( zone . time_until_mw ) <EOL> self . assertFalse ( zone . next_mw_duration ) <EOL> zone_no_mw = self . driver . ex_get_zone ( '<STR_LIT>' ) <EOL> self . assertEqual ( zone_no_mw . time_until_mw , None ) <EOL> class GCEMockHttp ( MockHttpTestCase ) : <EOL> fixtures = ComputeFileFixtures ( '<STR_LIT>' ) <EOL> json_hdr = { '<STR_LIT>' : '<STR_LIT>' } <EOL> def _get_method_name ( self , type , use_param , qs , path ) : <EOL> api_path = '<STR_LIT>' % API_VERSION <EOL> project_path = '<STR_LIT>' % GCE_KEYWORD_PARAMS [ '<STR_LIT>' ] <EOL> path = path . replace ( api_path , '<STR_LIT>' ) <EOL> path = path . replace ( project_path , '<STR_LIT>' ) <EOL> if not path : <EOL> path = '<STR_LIT>' <EOL> method_name = super ( GCEMockHttp , self ) . _get_method_name ( type , <EOL> use_param , <EOL> qs , path ) <EOL> return method_name <EOL> def _setUsageExportBucket ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_custom_node ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_setMachineType ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_setMachineType_notstopped ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_custom_node_setMachineType ( self , method , url , body , header ) : <EOL> body = { <EOL> "<STR_LIT:error>" : { <EOL> "<STR_LIT>" : [ <EOL> { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT:message>" : "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> } <EOL> ] , <EOL> "<STR_LIT:code>" : <NUM_LIT> , <EOL> "<STR_LIT:message>" : "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> } <EOL> } <EOL> return ( httplib . BAD_REQUEST , body , self . json_hdr , httplib . responses [ httplib . BAD_REQUEST ] ) <EOL> def _zones_us_central1_a_instances_stopped_node_setMachineType ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_setMachineType ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_startnode ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_stopped_node_start ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_stopped_node_stop ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_stopped_node ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_stopnode ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_stop ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_setMetadata ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _setCommonInstanceMetadata ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_addresses ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_diskTypes ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_disks ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_forwardingRules ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_instances ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_machineTypes ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_targetInstances ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _aggregated_targetPools ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_backendServices ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> backend_name = getattr ( self . test , '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> body = self . fixtures . load ( '<STR_LIT>' % <EOL> backend_name ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_backendServices_no_backends ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_backendServices_web_service ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_forwardingRules ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_forwardingRules_http_rule ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_httpHealthChecks ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_httpHealthChecks_default_health_check ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_httpHealthChecks_basic_check ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_httpHealthChecks_libcloud_lb_demo_healthcheck ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_httpHealthChecks_lchealthcheck ( self , method , url , body , <EOL> headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> elif method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_firewalls ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_firewalls_lcfirewall ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> elif method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_images ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_images_debian_7_wheezy_v20131120 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_images_debian_7_wheezy_v20131014_deprecate ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_images_family_coreos ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . NOT_FOUND , body , self . json_hdr , <EOL> httplib . responses [ httplib . NOT_FOUND ] ) <EOL> def _global_images_family_nofamily ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . NOT_FOUND , body , self . json_hdr , <EOL> httplib . responses [ httplib . NOT_FOUND ] ) <EOL> def _global_routes ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_networks ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_networks_default ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_networks_libcloud_demo_network ( self , method , url , body , <EOL> headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_networks_libcloud_demo_europe_network ( self , method , url , body , <EOL> headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_routes_lcdemoroute ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_networks_lcnetwork ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_snapshots ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_snapshots_lcsnapshot ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_setUsageExportBucket ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_setCommonInstanceMetadata ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_backendServices_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_backendServices_web_service_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_forwardingRules_http_rule_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_forwardingRules_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_httpHealthChecks_lchealthcheck_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_images_debian7_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_httpHealthChecks_lchealthcheck_put ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_httpHealthChecks_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_firewalls_lcfirewall_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_firewalls_lcfirewall_put ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_firewalls_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_routes_lcdemoroute_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_networks_lcnetwork_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_routes_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_networks_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_snapshots_lcsnapshot_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_image_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_addresses_lcaddressglobal_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_targetHttpProxies_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_targetHttpProxies_web_proxy_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_urlMaps_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_urlMaps_web_map_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_targetHttpProxies ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_targetHttpProxies_web_proxy ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_urlMaps ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_urlMaps_web_map ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_addresses_lcaddress_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_operations_operation_global_addresses_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_addresses_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_forwardingRules_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_forwardingRules_lcforwardingrule_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_deleteAccessConfig ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_serialPort ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_addAccessConfig ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_setMetadata_post ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_targetInstances_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_addAccessConfig_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_deleteAccessConfig_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_targetInstances_lctargetinstance_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lctargetpool_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lctargetpool_removeHealthCheck_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lctargetpool_addHealthCheck_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lctargetpool_removeInstance_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lb_pool_setBackup_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_operations_operation_regions_us_central1_targetPools_lctargetpool_addInstance_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_lcdisk_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_setDiskAutoDelete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_volume_auto_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_lcdisk_createSnapshot_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_disks_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_lcnode_000_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_lcnode_001_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_delete ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_attachDisk_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_detachDisk_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_setTags_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_node_name_reset_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_operations_operation_zones_europe_west1_a_instances_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_operations_operation_zones_us_central1_a_instances_post ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _project ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_windows_cloud_global_licenses_windows_server_2008_r2_dc ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_suse_cloud_global_licenses_sles_11 ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_rhel_cloud_global_licenses_rhel_7_server ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_suse_cloud_global_licenses_sles_12 ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_windows_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_rhel_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_gce_nvme_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_coreos_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_coreos_cloud_global_images_family_coreos ( <EOL> self , method , url , body , header ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_opensuse_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_google_containers_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_ubuntu_os_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_centos_cloud_global_images ( self , method , url , body , header ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_suse_cloud_global_images ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _projects_debian_cloud_global_images ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions ( self , method , url , body , headers ) : <EOL> if '<STR_LIT>' in url or '<STR_LIT>' in url : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> elif '<STR_LIT>' in url : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_addresses ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_addresses ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _global_addresses_lcaddressglobal ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_addresses_lcaddress ( self , method , url , body , <EOL> headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_forwardingRules ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_forwardingRules_libcloud_lb_demo_lb ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_forwardingRules_lcforwardingrule ( <EOL> self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_targetInstances ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_targetInstances_lctargetinstance ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lb_pool_getHealth ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lb_pool ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool ( self , method , url , <EOL> body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool_sticky ( self , method , url , <EOL> body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_backup_pool ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_libcloud_lb_demo_lb_tp ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool_removeHealthCheck ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool_addHealthCheck ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool_removeInstance ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lb_pool_setBackup ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _regions_us_central1_targetPools_lctargetpool_addInstance ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_asia_east_1a ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_diskTypes ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_diskTypes_pd_standard ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_diskTypes_pd_ssd ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks_lcdisk ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks_lcdisk_createSnapshot ( self , method , url , <EOL> body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks_node_name ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks_lcnode_000 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_disks_lcnode_001 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_disks_libcloud_lb_demo_www_000 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_disks_libcloud_lb_demo_www_001 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_disks_libcloud_lb_demo_www_002 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central2_a_disks_libcloud_demo_boot_disk ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central2_a_disks_libcloud_demo_np_node ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_000 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central2_a_disks_libcloud_demo_multiple_nodes_001 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_disks ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_disks_libcloud_demo_europe_np_node ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_disks_libcloud_demo_europe_boot_disk ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_disks_libcloud_demo_europe_multiple_nodes_000 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_instances ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_diskTypes_pd_standard ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances ( self , method , url , body , headers ) : <EOL> if method == '<STR_LIT:POST>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name ( self , method , url , body , <EOL> headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_attachDisk ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_detachDisk ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_setTags ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_node_name_reset ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_lcnode_000 ( self , method , url , body , <EOL> headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_instances_lcnode_001 ( self , method , url , body , <EOL> headers ) : <EOL> if method == '<STR_LIT>' : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> else : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_instances_libcloud_lb_demo_www_000 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_instances_libcloud_lb_demo_www_001 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_b_instances_libcloud_lb_demo_www_002 ( <EOL> self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . NOT_FOUND , body , self . json_hdr , <EOL> httplib . responses [ httplib . NOT_FOUND ] ) <EOL> def _zones_us_central1_a ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_machineTypes ( self , method , url , body , headers ) : <EOL> body = self . fixtures . load ( '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_europe_west1_a_machineTypes_n1_standard_1 ( self , method , url , <EOL> body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> def _zones_us_central1_a_machineTypes_n1_standard_1 ( self , method , url , <EOL> body , headers ) : <EOL> body = self . fixtures . load ( <EOL> '<STR_LIT>' ) <EOL> return ( httplib . OK , body , self . json_hdr , httplib . responses [ httplib . OK ] ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . exit ( unittest . main ( ) ) </s>
