repository_name
stringlengths 7
55
| func_path_in_repository
stringlengths 4
223
| func_name
stringlengths 1
134
| whole_func_string
stringlengths 75
104k
| language
stringclasses 1
value | func_code_string
stringlengths 75
104k
| func_code_tokens
sequencelengths 19
28.4k
| func_documentation_string
stringlengths 1
46.9k
| func_documentation_tokens
sequencelengths 1
1.97k
| split_name
stringclasses 1
value | func_code_url
stringlengths 87
315
|
---|---|---|---|---|---|---|---|---|---|---|
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_environment | def create_api_environment(self):
"""Get an instance of Api Environment services facade."""
return ApiEnvironment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_environment(self):
"""Get an instance of Api Environment services facade."""
return ApiEnvironment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_environment",
"(",
"self",
")",
":",
"return",
"ApiEnvironment",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Environment services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Environment",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L124-L130 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_equipment | def create_api_equipment(self):
"""Get an instance of Api Equipment services facade."""
return ApiEquipment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_equipment(self):
"""Get an instance of Api Equipment services facade."""
return ApiEquipment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_equipment",
"(",
"self",
")",
":",
"return",
"ApiEquipment",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Equipment services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Equipment",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L132-L138 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_equipment | def create_api_v4_equipment(self):
"""Get an instance of Api Equipment services facade."""
return ApiV4Equipment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_equipment(self):
"""Get an instance of Api Equipment services facade."""
return ApiV4Equipment(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_equipment",
"(",
"self",
")",
":",
"return",
"ApiV4Equipment",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Equipment services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Equipment",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L140-L146 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_as | def create_api_v4_as(self):
"""Get an instance of Api As services facade."""
return ApiV4As(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_as(self):
"""Get an instance of Api As services facade."""
return ApiV4As(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_as",
"(",
"self",
")",
":",
"return",
"ApiV4As",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api As services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"As",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L148-L154 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_virtual_interface | def create_api_v4_virtual_interface(self):
"""Get an instance of Api Virtual Interface services facade."""
return ApiV4VirtualInterface(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_virtual_interface(self):
"""Get an instance of Api Virtual Interface services facade."""
return ApiV4VirtualInterface(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_virtual_interface",
"(",
"self",
")",
":",
"return",
"ApiV4VirtualInterface",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Virtual Interface services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Virtual",
"Interface",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L156-L162 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_neighbor | def create_api_v4_neighbor(self):
"""Get an instance of Api Neighbor services facade."""
return ApiV4Neighbor(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_neighbor(self):
"""Get an instance of Api Neighbor services facade."""
return ApiV4Neighbor(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_neighbor",
"(",
"self",
")",
":",
"return",
"ApiV4Neighbor",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Neighbor services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Neighbor",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L164-L170 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_interface_request | def create_api_interface_request(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiInterfaceRequest(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_interface_request(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiInterfaceRequest(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_interface_request",
"(",
"self",
")",
":",
"return",
"ApiInterfaceRequest",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vip Requests services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vip",
"Requests",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L172-L179 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_ipv4 | def create_api_ipv4(self):
"""Get an instance of Api IPv4 services facade."""
return ApiIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_ipv4(self):
"""Get an instance of Api IPv4 services facade."""
return ApiIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_ipv4",
"(",
"self",
")",
":",
"return",
"ApiIPv4",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api IPv4 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"IPv4",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L181-L188 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_ipv6 | def create_api_ipv6(self):
"""Get an instance of Api IPv6 services facade."""
return ApiIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_ipv6(self):
"""Get an instance of Api IPv6 services facade."""
return ApiIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_ipv6",
"(",
"self",
")",
":",
"return",
"ApiIPv6",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api IPv6 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"IPv6",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L190-L197 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_ipv4 | def create_api_v4_ipv4(self):
"""Get an instance of Api V4 IPv4 services facade."""
return ApiV4IPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_ipv4(self):
"""Get an instance of Api V4 IPv4 services facade."""
return ApiV4IPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_ipv4",
"(",
"self",
")",
":",
"return",
"ApiV4IPv4",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api V4 IPv4 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"V4",
"IPv4",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L199-L206 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_v4_ipv6 | def create_api_v4_ipv6(self):
"""Get an instance of Api V4 IPv6 services facade."""
return ApiV4IPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_v4_ipv6(self):
"""Get an instance of Api V4 IPv6 services facade."""
return ApiV4IPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_v4_ipv6",
"(",
"self",
")",
":",
"return",
"ApiV4IPv6",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api V4 IPv6 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"V4",
"IPv6",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L208-L215 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_network_ipv4 | def create_api_network_ipv4(self):
"""Get an instance of Api Networkv4 services facade."""
return ApiNetworkIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_network_ipv4(self):
"""Get an instance of Api Networkv4 services facade."""
return ApiNetworkIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_network_ipv4",
"(",
"self",
")",
":",
"return",
"ApiNetworkIPv4",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Networkv4 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Networkv4",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L217-L224 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_network_ipv6 | def create_api_network_ipv6(self):
"""Get an instance of Api Networkv6 services facade."""
return ApiNetworkIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_network_ipv6(self):
"""Get an instance of Api Networkv6 services facade."""
return ApiNetworkIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_network_ipv6",
"(",
"self",
")",
":",
"return",
"ApiNetworkIPv6",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Networkv6 services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Networkv6",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L226-L233 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_option_vip | def create_api_option_vip(self):
"""Get an instance of Api Option Vip services facade."""
return ApiOptionVip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_option_vip(self):
"""Get an instance of Api Option Vip services facade."""
return ApiOptionVip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_option_vip",
"(",
"self",
")",
":",
"return",
"ApiOptionVip",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Option Vip services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Option",
"Vip",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L235-L241 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_pool | def create_api_pool(self):
"""Get an instance of Api Pool services facade."""
return ApiPool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_pool(self):
"""Get an instance of Api Pool services facade."""
return ApiPool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_pool",
"(",
"self",
")",
":",
"return",
"ApiPool",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Pool services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Pool",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L243-L249 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_pool_deploy | def create_api_pool_deploy(self):
"""Get an instance of Api Pool Deploy services facade."""
return ApiPoolDeploy(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_pool_deploy(self):
"""Get an instance of Api Pool Deploy services facade."""
return ApiPoolDeploy(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_pool_deploy",
"(",
"self",
")",
":",
"return",
"ApiPoolDeploy",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Pool Deploy services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Pool",
"Deploy",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L251-L257 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_apirack | def create_apirack(self):
"""Get an instance of Api Rack Variables services facade."""
return ApiRack(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_apirack(self):
"""Get an instance of Api Rack Variables services facade."""
return ApiRack(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_apirack",
"(",
"self",
")",
":",
"return",
"ApiRack",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Rack Variables services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Rack",
"Variables",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L259-L265 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_vip_request | def create_api_vip_request(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiVipRequest(
self.networkapi_url,
self.user,
self.password,
self.user_ldap,
self.log_level) | python | def create_api_vip_request(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiVipRequest(
self.networkapi_url,
self.user,
self.password,
self.user_ldap,
self.log_level) | [
"def",
"create_api_vip_request",
"(",
"self",
")",
":",
"return",
"ApiVipRequest",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
",",
"self",
".",
"log_level",
")"
] | Get an instance of Api Vip Requests services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vip",
"Requests",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L267-L275 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_object_type | def create_api_object_type(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectType(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_object_type(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectType(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_object_type",
"(",
"self",
")",
":",
"return",
"ApiObjectType",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vip Requests services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vip",
"Requests",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L277-L284 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_object_group_permission | def create_api_object_group_permission(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectGroupPermission(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_object_group_permission(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectGroupPermission(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_object_group_permission",
"(",
"self",
")",
":",
"return",
"ApiObjectGroupPermission",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vip Requests services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vip",
"Requests",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L286-L293 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_object_group_permission_general | def create_api_object_group_permission_general(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectGroupPermissionGeneral(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_object_group_permission_general(self):
"""Get an instance of Api Vip Requests services facade."""
return ApiObjectGroupPermissionGeneral(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_object_group_permission_general",
"(",
"self",
")",
":",
"return",
"ApiObjectGroupPermissionGeneral",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vip Requests services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vip",
"Requests",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L295-L302 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_vlan | def create_api_vlan(self):
"""Get an instance of Api Vlan services facade."""
return ApiVlan(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_vlan(self):
"""Get an instance of Api Vlan services facade."""
return ApiVlan(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_vlan",
"(",
"self",
")",
":",
"return",
"ApiVlan",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vlan services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vlan",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L304-L310 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_vrf | def create_api_vrf(self):
"""Get an instance of Api Vrf services facade."""
return ApiVrf(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_vrf(self):
"""Get an instance of Api Vrf services facade."""
return ApiVrf(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_vrf",
"(",
"self",
")",
":",
"return",
"ApiVrf",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Vrf services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Vrf",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L312-L318 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_rule | def create_rule(self):
"""Get an instance of block rule services facade."""
return BlockRule(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_rule(self):
"""Get an instance of block rule services facade."""
return BlockRule(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_rule",
"(",
"self",
")",
":",
"return",
"BlockRule",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of block rule services facade. | [
"Get",
"an",
"instance",
"of",
"block",
"rule",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L320-L326 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_direito_grupo_equipamento | def create_direito_grupo_equipamento(self):
"""Get an instance of direito_grupo_equipamento services facade."""
return DireitoGrupoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_direito_grupo_equipamento(self):
"""Get an instance of direito_grupo_equipamento services facade."""
return DireitoGrupoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_direito_grupo_equipamento",
"(",
"self",
")",
":",
"return",
"DireitoGrupoEquipamento",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of direito_grupo_equipamento services facade. | [
"Get",
"an",
"instance",
"of",
"direito_grupo_equipamento",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L328-L334 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_divisao_dc | def create_divisao_dc(self):
"""Get an instance of divisao_dc services facade."""
return DivisaoDc(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_divisao_dc(self):
"""Get an instance of divisao_dc services facade."""
return DivisaoDc(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_divisao_dc",
"(",
"self",
")",
":",
"return",
"DivisaoDc",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of divisao_dc services facade. | [
"Get",
"an",
"instance",
"of",
"divisao_dc",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L336-L342 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_environment_vip | def create_environment_vip(self):
"""Get an instance of environment_vip services facade."""
return EnvironmentVIP(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_environment_vip(self):
"""Get an instance of environment_vip services facade."""
return EnvironmentVIP(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_environment_vip",
"(",
"self",
")",
":",
"return",
"EnvironmentVIP",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of environment_vip services facade. | [
"Get",
"an",
"instance",
"of",
"environment_vip",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L344-L350 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_equipamento | def create_equipamento(self):
"""Get an instance of equipamento services facade."""
return Equipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_equipamento(self):
"""Get an instance of equipamento services facade."""
return Equipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_equipamento",
"(",
"self",
")",
":",
"return",
"Equipamento",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of equipamento services facade. | [
"Get",
"an",
"instance",
"of",
"equipamento",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L352-L358 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_equipamento_acesso | def create_equipamento_acesso(self):
"""Get an instance of equipamento_acesso services facade."""
return EquipamentoAcesso(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_equipamento_acesso(self):
"""Get an instance of equipamento_acesso services facade."""
return EquipamentoAcesso(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_equipamento_acesso",
"(",
"self",
")",
":",
"return",
"EquipamentoAcesso",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of equipamento_acesso services facade. | [
"Get",
"an",
"instance",
"of",
"equipamento_acesso",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L360-L366 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_equipamento_ambiente | def create_equipamento_ambiente(self):
"""Get an instance of equipamento_ambiente services facade."""
return EquipamentoAmbiente(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_equipamento_ambiente(self):
"""Get an instance of equipamento_ambiente services facade."""
return EquipamentoAmbiente(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_equipamento_ambiente",
"(",
"self",
")",
":",
"return",
"EquipamentoAmbiente",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of equipamento_ambiente services facade. | [
"Get",
"an",
"instance",
"of",
"equipamento_ambiente",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L368-L374 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_equipamento_roteiro | def create_equipamento_roteiro(self):
"""Get an instance of equipamento_roteiro services facade."""
return EquipamentoRoteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_equipamento_roteiro(self):
"""Get an instance of equipamento_roteiro services facade."""
return EquipamentoRoteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_equipamento_roteiro",
"(",
"self",
")",
":",
"return",
"EquipamentoRoteiro",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of equipamento_roteiro services facade. | [
"Get",
"an",
"instance",
"of",
"equipamento_roteiro",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L376-L382 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_log | def create_log(self):
"""Get an instance of log services facade."""
return EventLog(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_log(self):
"""Get an instance of log services facade."""
return EventLog(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_log",
"(",
"self",
")",
":",
"return",
"EventLog",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of log services facade. | [
"Get",
"an",
"instance",
"of",
"log",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L384-L390 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_filter | def create_filter(self):
"""Get an instance of filter services facade."""
return Filter(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_filter(self):
"""Get an instance of filter services facade."""
return Filter(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_filter",
"(",
"self",
")",
":",
"return",
"Filter",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of filter services facade. | [
"Get",
"an",
"instance",
"of",
"filter",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L392-L398 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_grupo_equipamento | def create_grupo_equipamento(self):
"""Get an instance of grupo_equipamento services facade."""
return GrupoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_grupo_equipamento(self):
"""Get an instance of grupo_equipamento services facade."""
return GrupoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_grupo_equipamento",
"(",
"self",
")",
":",
"return",
"GrupoEquipamento",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of grupo_equipamento services facade. | [
"Get",
"an",
"instance",
"of",
"grupo_equipamento",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L400-L406 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_grupo_l3 | def create_grupo_l3(self):
"""Get an instance of grupo_l3 services facade."""
return GrupoL3(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_grupo_l3(self):
"""Get an instance of grupo_l3 services facade."""
return GrupoL3(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_grupo_l3",
"(",
"self",
")",
":",
"return",
"GrupoL3",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of grupo_l3 services facade. | [
"Get",
"an",
"instance",
"of",
"grupo_l3",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L408-L414 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_grupo_usuario | def create_grupo_usuario(self):
"""Get an instance of grupo_usuario services facade."""
return GrupoUsuario(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_grupo_usuario(self):
"""Get an instance of grupo_usuario services facade."""
return GrupoUsuario(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_grupo_usuario",
"(",
"self",
")",
":",
"return",
"GrupoUsuario",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of grupo_usuario services facade. | [
"Get",
"an",
"instance",
"of",
"grupo_usuario",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L416-L422 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_grupo_virtual | def create_grupo_virtual(self):
"""Get an instance of grupo_virtual services facade."""
return GrupoVirtual(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_grupo_virtual(self):
"""Get an instance of grupo_virtual services facade."""
return GrupoVirtual(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_grupo_virtual",
"(",
"self",
")",
":",
"return",
"GrupoVirtual",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of grupo_virtual services facade. | [
"Get",
"an",
"instance",
"of",
"grupo_virtual",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L424-L430 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_healthcheck | def create_healthcheck(self):
"""Get an instance of Poll services facade."""
return Healthcheck(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_healthcheck(self):
"""Get an instance of Poll services facade."""
return Healthcheck(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_healthcheck",
"(",
"self",
")",
":",
"return",
"Healthcheck",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Poll services facade. | [
"Get",
"an",
"instance",
"of",
"Poll",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L432-L439 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_interface | def create_interface(self):
"""Get an instance of interface services facade."""
return Interface(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_interface(self):
"""Get an instance of interface services facade."""
return Interface(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_interface",
"(",
"self",
")",
":",
"return",
"Interface",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of interface services facade. | [
"Get",
"an",
"instance",
"of",
"interface",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L441-L447 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_ip | def create_ip(self):
"""Get an instance of ip services facade."""
return Ip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_ip(self):
"""Get an instance of ip services facade."""
return Ip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_ip",
"(",
"self",
")",
":",
"return",
"Ip",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of ip services facade. | [
"Get",
"an",
"instance",
"of",
"ip",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L449-L455 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_marca | def create_marca(self):
"""Get an instance of marca services facade."""
return Marca(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_marca(self):
"""Get an instance of marca services facade."""
return Marca(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_marca",
"(",
"self",
")",
":",
"return",
"Marca",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of marca services facade. | [
"Get",
"an",
"instance",
"of",
"marca",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L457-L463 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_modelo | def create_modelo(self):
"""Get an instance of modelo services facade."""
return Modelo(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_modelo(self):
"""Get an instance of modelo services facade."""
return Modelo(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_modelo",
"(",
"self",
")",
":",
"return",
"Modelo",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of modelo services facade. | [
"Get",
"an",
"instance",
"of",
"modelo",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L465-L471 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_dhcprelay_ipv4 | def create_dhcprelay_ipv4(self):
"""Get an instance of DHCPRelayIPv4 services facade."""
return DHCPRelayIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_dhcprelay_ipv4(self):
"""Get an instance of DHCPRelayIPv4 services facade."""
return DHCPRelayIPv4(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_dhcprelay_ipv4",
"(",
"self",
")",
":",
"return",
"DHCPRelayIPv4",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of DHCPRelayIPv4 services facade. | [
"Get",
"an",
"instance",
"of",
"DHCPRelayIPv4",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L473-L479 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_dhcprelay_ipv6 | def create_dhcprelay_ipv6(self):
"""Get an instance of DHCPRelayIPv6 services facade."""
return DHCPRelayIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_dhcprelay_ipv6(self):
"""Get an instance of DHCPRelayIPv6 services facade."""
return DHCPRelayIPv6(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_dhcprelay_ipv6",
"(",
"self",
")",
":",
"return",
"DHCPRelayIPv6",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of DHCPRelayIPv6 services facade. | [
"Get",
"an",
"instance",
"of",
"DHCPRelayIPv6",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L481-L487 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_network | def create_network(self):
"""Get an instance of vlan services facade."""
return Network(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_network(self):
"""Get an instance of vlan services facade."""
return Network(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_network",
"(",
"self",
")",
":",
"return",
"Network",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of vlan services facade. | [
"Get",
"an",
"instance",
"of",
"vlan",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L489-L495 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_option_pool | def create_option_pool(self):
"""Get an instance of option_pool services facade."""
return OptionPool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_option_pool(self):
"""Get an instance of option_pool services facade."""
return OptionPool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_option_pool",
"(",
"self",
")",
":",
"return",
"OptionPool",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of option_pool services facade. | [
"Get",
"an",
"instance",
"of",
"option_pool",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L497-L503 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_option_vip | def create_option_vip(self):
"""Get an instance of option_vip services facade."""
return OptionVIP(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_option_vip(self):
"""Get an instance of option_vip services facade."""
return OptionVIP(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_option_vip",
"(",
"self",
")",
":",
"return",
"OptionVIP",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of option_vip services facade. | [
"Get",
"an",
"instance",
"of",
"option_vip",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L505-L511 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_permissao_administrativa | def create_permissao_administrativa(self):
"""Get an instance of permissao_administrativa services facade."""
return PermissaoAdministrativa(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_permissao_administrativa(self):
"""Get an instance of permissao_administrativa services facade."""
return PermissaoAdministrativa(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_permissao_administrativa",
"(",
"self",
")",
":",
"return",
"PermissaoAdministrativa",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of permissao_administrativa services facade. | [
"Get",
"an",
"instance",
"of",
"permissao_administrativa",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L513-L519 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_permission | def create_permission(self):
"""Get an instance of permission services facade."""
return Permission(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_permission(self):
"""Get an instance of permission services facade."""
return Permission(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_permission",
"(",
"self",
")",
":",
"return",
"Permission",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of permission services facade. | [
"Get",
"an",
"instance",
"of",
"permission",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L521-L527 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_pool | def create_pool(self):
"""Get an instance of Poll services facade."""
return Pool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_pool(self):
"""Get an instance of Poll services facade."""
return Pool(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_pool",
"(",
"self",
")",
":",
"return",
"Pool",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Poll services facade. | [
"Get",
"an",
"instance",
"of",
"Poll",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L529-L536 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_rack | def create_rack(self):
"""Get an instance of rack services facade."""
return Rack(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_rack(self):
"""Get an instance of rack services facade."""
return Rack(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_rack",
"(",
"self",
")",
":",
"return",
"Rack",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of rack services facade. | [
"Get",
"an",
"instance",
"of",
"rack",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L538-L544 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_rackservers | def create_rackservers(self):
"""Get an instance of rackservers services facade."""
return RackServers(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_rackservers(self):
"""Get an instance of rackservers services facade."""
return RackServers(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_rackservers",
"(",
"self",
")",
":",
"return",
"RackServers",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of rackservers services facade. | [
"Get",
"an",
"instance",
"of",
"rackservers",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L546-L552 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_roteiro | def create_roteiro(self):
"""Get an instance of roteiro services facade."""
return Roteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_roteiro(self):
"""Get an instance of roteiro services facade."""
return Roteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_roteiro",
"(",
"self",
")",
":",
"return",
"Roteiro",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of roteiro services facade. | [
"Get",
"an",
"instance",
"of",
"roteiro",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L554-L560 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_system | def create_system(self):
"""Get an instance of Api System Variables services facade."""
return System(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_system(self):
"""Get an instance of Api System Variables services facade."""
return System(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_system",
"(",
"self",
")",
":",
"return",
"System",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api System Variables services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"System",
"Variables",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L562-L568 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_tipo_acesso | def create_tipo_acesso(self):
"""Get an instance of tipo_acesso services facade."""
return TipoAcesso(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_tipo_acesso(self):
"""Get an instance of tipo_acesso services facade."""
return TipoAcesso(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_tipo_acesso",
"(",
"self",
")",
":",
"return",
"TipoAcesso",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of tipo_acesso services facade. | [
"Get",
"an",
"instance",
"of",
"tipo_acesso",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L570-L576 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_tipo_equipamento | def create_tipo_equipamento(self):
"""Get an instance of tipo_equipamento services facade."""
return TipoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_tipo_equipamento(self):
"""Get an instance of tipo_equipamento services facade."""
return TipoEquipamento(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_tipo_equipamento",
"(",
"self",
")",
":",
"return",
"TipoEquipamento",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of tipo_equipamento services facade. | [
"Get",
"an",
"instance",
"of",
"tipo_equipamento",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L578-L584 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_tipo_rede | def create_tipo_rede(self):
"""Get an instance of tipo_rede services facade."""
return TipoRede(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_tipo_rede(self):
"""Get an instance of tipo_rede services facade."""
return TipoRede(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_tipo_rede",
"(",
"self",
")",
":",
"return",
"TipoRede",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of tipo_rede services facade. | [
"Get",
"an",
"instance",
"of",
"tipo_rede",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L586-L592 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_tipo_roteiro | def create_tipo_roteiro(self):
"""Get an instance of tipo_roteiro services facade."""
return TipoRoteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_tipo_roteiro(self):
"""Get an instance of tipo_roteiro services facade."""
return TipoRoteiro(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_tipo_roteiro",
"(",
"self",
")",
":",
"return",
"TipoRoteiro",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of tipo_roteiro services facade. | [
"Get",
"an",
"instance",
"of",
"tipo_roteiro",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L594-L600 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_usuario | def create_usuario(self):
"""Get an instance of usuario services facade."""
return Usuario(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_usuario(self):
"""Get an instance of usuario services facade."""
return Usuario(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_usuario",
"(",
"self",
")",
":",
"return",
"Usuario",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of usuario services facade. | [
"Get",
"an",
"instance",
"of",
"usuario",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L602-L608 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_usuario_grupo | def create_usuario_grupo(self):
"""Get an instance of usuario_grupo services facade."""
return UsuarioGrupo(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_usuario_grupo(self):
"""Get an instance of usuario_grupo services facade."""
return UsuarioGrupo(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_usuario_grupo",
"(",
"self",
")",
":",
"return",
"UsuarioGrupo",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of usuario_grupo services facade. | [
"Get",
"an",
"instance",
"of",
"usuario_grupo",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L610-L616 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_vip | def create_vip(self):
"""Get an instance of vip services facade."""
return Vip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_vip(self):
"""Get an instance of vip services facade."""
return Vip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_vip",
"(",
"self",
")",
":",
"return",
"Vip",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of vip services facade. | [
"Get",
"an",
"instance",
"of",
"vip",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L618-L624 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_vlan | def create_vlan(self):
"""Get an instance of vlan services facade."""
return Vlan(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_vlan(self):
"""Get an instance of vlan services facade."""
return Vlan(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_vlan",
"(",
"self",
")",
":",
"return",
"Vlan",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of vlan services facade. | [
"Get",
"an",
"instance",
"of",
"vlan",
"services",
"facade",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L626-L632 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.deploy | def deploy(self, id_networkv6):
"""Deploy network in equipments and set column 'active = 1' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output
"""
data = dict()
uri = 'api/networkv6/%s/equipments/' % id_networkv6
return super(ApiNetworkIPv6, self).post(uri, data=data) | python | def deploy(self, id_networkv6):
"""Deploy network in equipments and set column 'active = 1' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output
"""
data = dict()
uri = 'api/networkv6/%s/equipments/' % id_networkv6
return super(ApiNetworkIPv6, self).post(uri, data=data) | [
"def",
"deploy",
"(",
"self",
",",
"id_networkv6",
")",
":",
"data",
"=",
"dict",
"(",
")",
"uri",
"=",
"'api/networkv6/%s/equipments/'",
"%",
"id_networkv6",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"post",
"(",
"uri",
",",
"data",
"=",
"data",
")"
] | Deploy network in equipments and set column 'active = 1' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output | [
"Deploy",
"network",
"in",
"equipments",
"and",
"set",
"column",
"active",
"=",
"1",
"in",
"tables",
"redeipv6",
"]"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L22-L33 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.get_by_id | def get_by_id(self, id_networkv6):
"""Get IPv6 network
:param id_networkv4: ID for NetworkIPv6
:return: IPv6 Network
"""
uri = 'api/networkv4/%s/' % id_networkv6
return super(ApiNetworkIPv6, self).get(uri) | python | def get_by_id(self, id_networkv6):
"""Get IPv6 network
:param id_networkv4: ID for NetworkIPv6
:return: IPv6 Network
"""
uri = 'api/networkv4/%s/' % id_networkv6
return super(ApiNetworkIPv6, self).get(uri) | [
"def",
"get_by_id",
"(",
"self",
",",
"id_networkv6",
")",
":",
"uri",
"=",
"'api/networkv4/%s/'",
"%",
"id_networkv6",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Get IPv6 network
:param id_networkv4: ID for NetworkIPv6
:return: IPv6 Network | [
"Get",
"IPv6",
"network"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L35-L44 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.list | def list(self, environment_vip=None):
"""List networks redeipv6 ]
:param environment_vip: environment vip to filter
:return: IPv6 Networks
"""
uri = 'api/networkv6/?'
if environment_vip:
uri += 'environment_vip=%s' % environment_vip
return super(ApiNetworkIPv6, self).get(uri) | python | def list(self, environment_vip=None):
"""List networks redeipv6 ]
:param environment_vip: environment vip to filter
:return: IPv6 Networks
"""
uri = 'api/networkv6/?'
if environment_vip:
uri += 'environment_vip=%s' % environment_vip
return super(ApiNetworkIPv6, self).get(uri) | [
"def",
"list",
"(",
"self",
",",
"environment_vip",
"=",
"None",
")",
":",
"uri",
"=",
"'api/networkv6/?'",
"if",
"environment_vip",
":",
"uri",
"+=",
"'environment_vip=%s'",
"%",
"environment_vip",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | List networks redeipv6 ]
:param environment_vip: environment vip to filter
:return: IPv6 Networks | [
"List",
"networks",
"redeipv6",
"]"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L46-L58 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.undeploy | def undeploy(self, id_networkv6):
"""Remove deployment of network in equipments and set column 'active = 0' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output
"""
uri = 'api/networkv6/%s/equipments/' % id_networkv6
return super(ApiNetworkIPv6, self).delete(uri) | python | def undeploy(self, id_networkv6):
"""Remove deployment of network in equipments and set column 'active = 0' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output
"""
uri = 'api/networkv6/%s/equipments/' % id_networkv6
return super(ApiNetworkIPv6, self).delete(uri) | [
"def",
"undeploy",
"(",
"self",
",",
"id_networkv6",
")",
":",
"uri",
"=",
"'api/networkv6/%s/equipments/'",
"%",
"id_networkv6",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"delete",
"(",
"uri",
")"
] | Remove deployment of network in equipments and set column 'active = 0' in tables redeipv6 ]
:param id_networkv6: ID for NetworkIPv6
:return: Equipments configuration output | [
"Remove",
"deployment",
"of",
"network",
"in",
"equipments",
"and",
"set",
"column",
"active",
"=",
"0",
"in",
"tables",
"redeipv6",
"]"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L60-L69 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.check_vip_ip | def check_vip_ip(self, ip, environment_vip):
"""
Check available ipv6 in environment vip
"""
uri = 'api/ipv6/ip/%s/environment-vip/%s/' % (ip, environment_vip)
return super(ApiNetworkIPv6, self).get(uri) | python | def check_vip_ip(self, ip, environment_vip):
"""
Check available ipv6 in environment vip
"""
uri = 'api/ipv6/ip/%s/environment-vip/%s/' % (ip, environment_vip)
return super(ApiNetworkIPv6, self).get(uri) | [
"def",
"check_vip_ip",
"(",
"self",
",",
"ip",
",",
"environment_vip",
")",
":",
"uri",
"=",
"'api/ipv6/ip/%s/environment-vip/%s/'",
"%",
"(",
"ip",
",",
"environment_vip",
")",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Check available ipv6 in environment vip | [
"Check",
"available",
"ipv6",
"in",
"environment",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L71-L77 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.delete_ipv6 | def delete_ipv6(self, ipv6_id):
"""
Delete ipv6
"""
uri = 'api/ipv6/%s/' % (ipv6_id)
return super(ApiNetworkIPv6, self).delete(uri) | python | def delete_ipv6(self, ipv6_id):
"""
Delete ipv6
"""
uri = 'api/ipv6/%s/' % (ipv6_id)
return super(ApiNetworkIPv6, self).delete(uri) | [
"def",
"delete_ipv6",
"(",
"self",
",",
"ipv6_id",
")",
":",
"uri",
"=",
"'api/ipv6/%s/'",
"%",
"(",
"ipv6_id",
")",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"delete",
"(",
"uri",
")"
] | Delete ipv6 | [
"Delete",
"ipv6"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L79-L85 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.search | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail') or basic ('basic').
:return: Dict containing ipv6's
"""
return super(ApiNetworkIPv6, self).get(self.prepare_url('api/v3/networkv6/',
kwargs)) | python | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail') or basic ('basic').
:return: Dict containing ipv6's
"""
return super(ApiNetworkIPv6, self).get(self.prepare_url('api/v3/networkv6/',
kwargs)) | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/networkv6/'",
",",
"kwargs",
")",
")"
] | Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail') or basic ('basic').
:return: Dict containing ipv6's | [
"Method",
"to",
"search",
"ipv6",
"s",
"based",
"on",
"extends",
"search",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L87-L100 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.delete | def delete(self, ids):
"""
Method to delete network-ipv6's by their ids
:param ids: Identifiers of network-ipv6's
:return: None
"""
url = build_uri_with_ids('api/v3/networkv6/%s/', ids)
return super(ApiNetworkIPv6, self).delete(url) | python | def delete(self, ids):
"""
Method to delete network-ipv6's by their ids
:param ids: Identifiers of network-ipv6's
:return: None
"""
url = build_uri_with_ids('api/v3/networkv6/%s/', ids)
return super(ApiNetworkIPv6, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/networkv6/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete network-ipv6's by their ids
:param ids: Identifiers of network-ipv6's
:return: None | [
"Method",
"to",
"delete",
"network",
"-",
"ipv6",
"s",
"by",
"their",
"ids"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L117-L126 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.update | def update(self, networkipv6s):
"""
Method to update network-ipv6's
:param networkipv6s: List containing network-ipv6's desired to updated
:return: None
"""
data = {'networks': networkipv6s}
networkipv6s_ids = [str(networkipv6.get('id'))
for networkipv6 in networkipv6s]
return super(ApiNetworkIPv6, self).put('api/v3/networkv6/%s/' %
';'.join(networkipv6s_ids), data) | python | def update(self, networkipv6s):
"""
Method to update network-ipv6's
:param networkipv6s: List containing network-ipv6's desired to updated
:return: None
"""
data = {'networks': networkipv6s}
networkipv6s_ids = [str(networkipv6.get('id'))
for networkipv6 in networkipv6s]
return super(ApiNetworkIPv6, self).put('api/v3/networkv6/%s/' %
';'.join(networkipv6s_ids), data) | [
"def",
"update",
"(",
"self",
",",
"networkipv6s",
")",
":",
"data",
"=",
"{",
"'networks'",
":",
"networkipv6s",
"}",
"networkipv6s_ids",
"=",
"[",
"str",
"(",
"networkipv6",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"networkipv6",
"in",
"networkipv6s",
"]",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"put",
"(",
"'api/v3/networkv6/%s/'",
"%",
"';'",
".",
"join",
"(",
"networkipv6s_ids",
")",
",",
"data",
")"
] | Method to update network-ipv6's
:param networkipv6s: List containing network-ipv6's desired to updated
:return: None | [
"Method",
"to",
"update",
"network",
"-",
"ipv6",
"s"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L128-L141 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiNetworkIPv6.py | ApiNetworkIPv6.create | def create(self, networkipv6s):
"""
Method to create network-ipv6's
:param networkipv6s: List containing networkipv6's desired to be created on database
:return: None
"""
data = {'networks': networkipv6s}
return super(ApiNetworkIPv6, self).post('api/v3/networkv6/', data) | python | def create(self, networkipv6s):
"""
Method to create network-ipv6's
:param networkipv6s: List containing networkipv6's desired to be created on database
:return: None
"""
data = {'networks': networkipv6s}
return super(ApiNetworkIPv6, self).post('api/v3/networkv6/', data) | [
"def",
"create",
"(",
"self",
",",
"networkipv6s",
")",
":",
"data",
"=",
"{",
"'networks'",
":",
"networkipv6s",
"}",
"return",
"super",
"(",
"ApiNetworkIPv6",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/networkv6/'",
",",
"data",
")"
] | Method to create network-ipv6's
:param networkipv6s: List containing networkipv6's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"network",
"-",
"ipv6",
"s"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiNetworkIPv6.py#L143-L152 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.list_all | def list_all(self):
"""
List all environment vips
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> } {... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environmentvip/all/'
code, xml = self.submit(None, 'GET', url)
key = 'environment_vip'
return get_list_map(self.response(code, xml, [key]), key) | python | def list_all(self):
"""
List all environment vips
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> } {... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environmentvip/all/'
code, xml = self.submit(None, 'GET', url)
key = 'environment_vip'
return get_list_map(self.response(code, xml, [key]), key) | [
"def",
"list_all",
"(",
"self",
")",
":",
"url",
"=",
"'environmentvip/all/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"key",
"=",
"'environment_vip'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"xml",
",",
"[",
"key",
"]",
")",
",",
"key",
")"
] | List all environment vips
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> } {... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"List",
"all",
"environment",
"vips"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L38-L60 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.list_all_available | def list_all_available(self, id_vlan):
"""
List all environment vips availables
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> }
{... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environmentvip/search/' + str(id_vlan)
code, xml = self.submit(None, 'GET', url)
key = 'environment_vip'
return get_list_map(self.response(code, xml, [key]), key) | python | def list_all_available(self, id_vlan):
"""
List all environment vips availables
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> }
{... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environmentvip/search/' + str(id_vlan)
code, xml = self.submit(None, 'GET', url)
key = 'environment_vip'
return get_list_map(self.response(code, xml, [key]), key) | [
"def",
"list_all_available",
"(",
"self",
",",
"id_vlan",
")",
":",
"url",
"=",
"'environmentvip/search/'",
"+",
"str",
"(",
"id_vlan",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"key",
"=",
"'environment_vip'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"xml",
",",
"[",
"key",
"]",
")",
",",
"key",
")"
] | List all environment vips availables
:return: Following dictionary:
::
{'environment_vip': [{'id': <id>,
'finalidade_txt': <finalidade_txt>,
'cliente_txt': <cliente_txt>,
'ambiente_p44_txt': <ambiente_p44_txt> }
{... other environments vip ...}]}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"List",
"all",
"environment",
"vips",
"availables"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L62-L86 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.add | def add(self, finalidade_txt, cliente_txt, ambiente_p44_txt, description):
"""Inserts a new Environment VIP and returns its identifier.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{'environment_vip': {'id': < id >}}
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
environmentvip_map = dict()
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
environmentvip_map['description'] = description
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'POST', 'environmentvip/')
return self.response(code, xml) | python | def add(self, finalidade_txt, cliente_txt, ambiente_p44_txt, description):
"""Inserts a new Environment VIP and returns its identifier.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{'environment_vip': {'id': < id >}}
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
environmentvip_map = dict()
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
environmentvip_map['description'] = description
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'POST', 'environmentvip/')
return self.response(code, xml) | [
"def",
"add",
"(",
"self",
",",
"finalidade_txt",
",",
"cliente_txt",
",",
"ambiente_p44_txt",
",",
"description",
")",
":",
"environmentvip_map",
"=",
"dict",
"(",
")",
"environmentvip_map",
"[",
"'finalidade_txt'",
"]",
"=",
"finalidade_txt",
"environmentvip_map",
"[",
"'cliente_txt'",
"]",
"=",
"cliente_txt",
"environmentvip_map",
"[",
"'ambiente_p44_txt'",
"]",
"=",
"ambiente_p44_txt",
"environmentvip_map",
"[",
"'description'",
"]",
"=",
"description",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'environment_vip'",
":",
"environmentvip_map",
"}",
",",
"'POST'",
",",
"'environmentvip/'",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Inserts a new Environment VIP and returns its identifier.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{'environment_vip': {'id': < id >}}
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Inserts",
"a",
"new",
"Environment",
"VIP",
"and",
"returns",
"its",
"identifier",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L88-L114 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.alter | def alter(
self,
id_environment_vip,
finalidade_txt,
cliente_txt,
ambiente_p44_txt,
description):
"""Change Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_environment_vip):
raise InvalidParameterError(
u'The identifier of Environment VIP is invalid or was not informed.')
environmentvip_map = dict()
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
environmentvip_map['description'] = description
url = 'environmentvip/' + str(id_environment_vip) + '/'
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'PUT', url)
return self.response(code, xml) | python | def alter(
self,
id_environment_vip,
finalidade_txt,
cliente_txt,
ambiente_p44_txt,
description):
"""Change Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_environment_vip):
raise InvalidParameterError(
u'The identifier of Environment VIP is invalid or was not informed.')
environmentvip_map = dict()
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
environmentvip_map['description'] = description
url = 'environmentvip/' + str(id_environment_vip) + '/'
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'PUT', url)
return self.response(code, xml) | [
"def",
"alter",
"(",
"self",
",",
"id_environment_vip",
",",
"finalidade_txt",
",",
"cliente_txt",
",",
"ambiente_p44_txt",
",",
"description",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_environment_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Environment VIP is invalid or was not informed.'",
")",
"environmentvip_map",
"=",
"dict",
"(",
")",
"environmentvip_map",
"[",
"'finalidade_txt'",
"]",
"=",
"finalidade_txt",
"environmentvip_map",
"[",
"'cliente_txt'",
"]",
"=",
"cliente_txt",
"environmentvip_map",
"[",
"'ambiente_p44_txt'",
"]",
"=",
"ambiente_p44_txt",
"environmentvip_map",
"[",
"'description'",
"]",
"=",
"description",
"url",
"=",
"'environmentvip/'",
"+",
"str",
"(",
"id_environment_vip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'environment_vip'",
":",
"environmentvip_map",
"}",
",",
"'PUT'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Change Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise InvalidParameterError: The value of finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Change",
"Environment",
"VIP",
"from",
"by",
"the",
"identifier",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L116-L154 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.remove | def remove(self, id_environment_vip):
"""Remove Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise EnvironmentVipError: There networkIPv4 or networkIPv6 associated with environment vip.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_environment_vip):
raise InvalidParameterError(
u'The identifier of Environment VIP is invalid or was not informed.')
url = 'environmentvip/' + str(id_environment_vip) + '/'
code, xml = self.submit(None, 'DELETE', url)
return self.response(code, xml) | python | def remove(self, id_environment_vip):
"""Remove Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise EnvironmentVipError: There networkIPv4 or networkIPv6 associated with environment vip.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_environment_vip):
raise InvalidParameterError(
u'The identifier of Environment VIP is invalid or was not informed.')
url = 'environmentvip/' + str(id_environment_vip) + '/'
code, xml = self.submit(None, 'DELETE', url)
return self.response(code, xml) | [
"def",
"remove",
"(",
"self",
",",
"id_environment_vip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_environment_vip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Environment VIP is invalid or was not informed.'",
")",
"url",
"=",
"'environmentvip/'",
"+",
"str",
"(",
"id_environment_vip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'DELETE'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Remove Environment VIP from by the identifier.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Environment VIP identifier is null and invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise EnvironmentVipError: There networkIPv4 or networkIPv6 associated with environment vip.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Remove",
"Environment",
"VIP",
"from",
"by",
"the",
"identifier",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L156-L178 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.search | def search(
self,
id_environment_vip=None,
finalidade_txt=None,
cliente_txt=None,
ambiente_p44_txt=None):
"""Search Environment VIP from by parameters.
Case the id parameter has been passed, the same it has priority over the other parameters.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{‘environment_vip’:
{‘id’: < id >,
‘finalidade_txt’: < finalidade_txt >,
‘finalidade’: < finalidade >,
‘cliente_txt’: < cliente_txt >,
‘ambiente_p44_txt’: < ambiente_p44_txt >}}
:raise InvalidParameterError: The value of id_environment_vip, finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
environmentvip_map = dict()
environmentvip_map['id_environment_vip'] = id_environment_vip
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'POST', 'environmentvip/search/')
return self.response(code, xml) | python | def search(
self,
id_environment_vip=None,
finalidade_txt=None,
cliente_txt=None,
ambiente_p44_txt=None):
"""Search Environment VIP from by parameters.
Case the id parameter has been passed, the same it has priority over the other parameters.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{‘environment_vip’:
{‘id’: < id >,
‘finalidade_txt’: < finalidade_txt >,
‘finalidade’: < finalidade >,
‘cliente_txt’: < cliente_txt >,
‘ambiente_p44_txt’: < ambiente_p44_txt >}}
:raise InvalidParameterError: The value of id_environment_vip, finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
environmentvip_map = dict()
environmentvip_map['id_environment_vip'] = id_environment_vip
environmentvip_map['finalidade_txt'] = finalidade_txt
environmentvip_map['cliente_txt'] = cliente_txt
environmentvip_map['ambiente_p44_txt'] = ambiente_p44_txt
code, xml = self.submit(
{'environment_vip': environmentvip_map}, 'POST', 'environmentvip/search/')
return self.response(code, xml) | [
"def",
"search",
"(",
"self",
",",
"id_environment_vip",
"=",
"None",
",",
"finalidade_txt",
"=",
"None",
",",
"cliente_txt",
"=",
"None",
",",
"ambiente_p44_txt",
"=",
"None",
")",
":",
"environmentvip_map",
"=",
"dict",
"(",
")",
"environmentvip_map",
"[",
"'id_environment_vip'",
"]",
"=",
"id_environment_vip",
"environmentvip_map",
"[",
"'finalidade_txt'",
"]",
"=",
"finalidade_txt",
"environmentvip_map",
"[",
"'cliente_txt'",
"]",
"=",
"cliente_txt",
"environmentvip_map",
"[",
"'ambiente_p44_txt'",
"]",
"=",
"ambiente_p44_txt",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'environment_vip'",
":",
"environmentvip_map",
"}",
",",
"'POST'",
",",
"'environmentvip/search/'",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Search Environment VIP from by parameters.
Case the id parameter has been passed, the same it has priority over the other parameters.
:param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero.
:param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param ambiente_p44_txt: Environment P44. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{‘environment_vip’:
{‘id’: < id >,
‘finalidade_txt’: < finalidade_txt >,
‘finalidade’: < finalidade >,
‘cliente_txt’: < cliente_txt >,
‘ambiente_p44_txt’: < ambiente_p44_txt >}}
:raise InvalidParameterError: The value of id_environment_vip, finalidade_txt, cliente_txt or ambiente_p44_txt is invalid.
:raise EnvironmentVipNotFoundError: Environment VIP not registered.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Search",
"Environment",
"VIP",
"from",
"by",
"parameters",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L180-L220 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.buscar_finalidade | def buscar_finalidade(self):
"""Search finalidade_txt environment vip
:return: Dictionary with the following structure:
::
{‘finalidade’: ‘finalidade’: <'finalidade_txt'>}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environment-vip/get/finality'
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | python | def buscar_finalidade(self):
"""Search finalidade_txt environment vip
:return: Dictionary with the following structure:
::
{‘finalidade’: ‘finalidade’: <'finalidade_txt'>}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
url = 'environment-vip/get/finality'
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | [
"def",
"buscar_finalidade",
"(",
"self",
")",
":",
"url",
"=",
"'environment-vip/get/finality'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Search finalidade_txt environment vip
:return: Dictionary with the following structure:
::
{‘finalidade’: ‘finalidade’: <'finalidade_txt'>}
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Search",
"finalidade_txt",
"environment",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L271-L287 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.buscar_cliente_por_finalidade | def buscar_cliente_por_finalidade(self, finalidade_txt):
"""Search cliente_txt environment vip
:return: Dictionary with the following structure:
::
{‘cliente_txt’:
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>'}
:raise InvalidParameterError: finalidade_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
vip_map = dict()
vip_map['finalidade_txt'] = finalidade_txt
url = 'environment-vip/get/cliente_txt/'
code, xml = self.submit({'vip': vip_map}, 'POST', url)
return self.response(code, xml) | python | def buscar_cliente_por_finalidade(self, finalidade_txt):
"""Search cliente_txt environment vip
:return: Dictionary with the following structure:
::
{‘cliente_txt’:
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>'}
:raise InvalidParameterError: finalidade_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
vip_map = dict()
vip_map['finalidade_txt'] = finalidade_txt
url = 'environment-vip/get/cliente_txt/'
code, xml = self.submit({'vip': vip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"buscar_cliente_por_finalidade",
"(",
"self",
",",
"finalidade_txt",
")",
":",
"vip_map",
"=",
"dict",
"(",
")",
"vip_map",
"[",
"'finalidade_txt'",
"]",
"=",
"finalidade_txt",
"url",
"=",
"'environment-vip/get/cliente_txt/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'vip'",
":",
"vip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Search cliente_txt environment vip
:return: Dictionary with the following structure:
::
{‘cliente_txt’:
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>'}
:raise InvalidParameterError: finalidade_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Search",
"cliente_txt",
"environment",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L289-L312 |
globocom/GloboNetworkAPI-client-python | networkapiclient/EnvironmentVIP.py | EnvironmentVIP.buscar_ambientep44_por_finalidade_cliente | def buscar_ambientep44_por_finalidade_cliente(
self,
finalidade_txt,
cliente_txt):
"""Search ambiente_p44_txt environment vip
:return: Dictionary with the following structure:
::
{‘ambiente_p44_txt’:
'id':<'id_ambientevip'>,
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>',
'ambiente_p44: <'ambiente_p44'>',}
:raise InvalidParameterError: finalidade_txt and cliente_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
vip_map = dict()
vip_map['finalidade_txt'] = finalidade_txt
vip_map['cliente_txt'] = cliente_txt
url = 'environment-vip/get/ambiente_p44_txt/'
code, xml = self.submit({'vip': vip_map}, 'POST', url)
return self.response(code, xml) | python | def buscar_ambientep44_por_finalidade_cliente(
self,
finalidade_txt,
cliente_txt):
"""Search ambiente_p44_txt environment vip
:return: Dictionary with the following structure:
::
{‘ambiente_p44_txt’:
'id':<'id_ambientevip'>,
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>',
'ambiente_p44: <'ambiente_p44'>',}
:raise InvalidParameterError: finalidade_txt and cliente_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
vip_map = dict()
vip_map['finalidade_txt'] = finalidade_txt
vip_map['cliente_txt'] = cliente_txt
url = 'environment-vip/get/ambiente_p44_txt/'
code, xml = self.submit({'vip': vip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"buscar_ambientep44_por_finalidade_cliente",
"(",
"self",
",",
"finalidade_txt",
",",
"cliente_txt",
")",
":",
"vip_map",
"=",
"dict",
"(",
")",
"vip_map",
"[",
"'finalidade_txt'",
"]",
"=",
"finalidade_txt",
"vip_map",
"[",
"'cliente_txt'",
"]",
"=",
"cliente_txt",
"url",
"=",
"'environment-vip/get/ambiente_p44_txt/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'vip'",
":",
"vip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Search ambiente_p44_txt environment vip
:return: Dictionary with the following structure:
::
{‘ambiente_p44_txt’:
'id':<'id_ambientevip'>,
‘finalidade’: <'finalidade_txt'>,
'cliente_txt: <'cliente_txt'>',
'ambiente_p44: <'ambiente_p44'>',}
:raise InvalidParameterError: finalidade_txt and cliente_txt is null and invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Search",
"ambiente_p44_txt",
"environment",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EnvironmentVIP.py#L314-L343 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.environmentvip_step | def environmentvip_step(self, finality='', client='', environmentp44=''):
"""
List finality, client or environment vip list.
Param finality: finality of environment(optional)
Param client: client of environment(optional)
Param environmentp44: environmentp44(optional)
Return finality list: when request has no finality and client.
Return client list: when request has only finality.
Return list environment vip: when request has finality and client.
Return environment vip: when request has finality, client and environmentvip
"""
uri = 'api/v3/environment-vip/step/?finality=%s&client=%s&environmentp44=%s' % (
finality, client, environmentp44)
return super(ApiEnvironmentVip, self).get(
uri) | python | def environmentvip_step(self, finality='', client='', environmentp44=''):
"""
List finality, client or environment vip list.
Param finality: finality of environment(optional)
Param client: client of environment(optional)
Param environmentp44: environmentp44(optional)
Return finality list: when request has no finality and client.
Return client list: when request has only finality.
Return list environment vip: when request has finality and client.
Return environment vip: when request has finality, client and environmentvip
"""
uri = 'api/v3/environment-vip/step/?finality=%s&client=%s&environmentp44=%s' % (
finality, client, environmentp44)
return super(ApiEnvironmentVip, self).get(
uri) | [
"def",
"environmentvip_step",
"(",
"self",
",",
"finality",
"=",
"''",
",",
"client",
"=",
"''",
",",
"environmentp44",
"=",
"''",
")",
":",
"uri",
"=",
"'api/v3/environment-vip/step/?finality=%s&client=%s&environmentp44=%s'",
"%",
"(",
"finality",
",",
"client",
",",
"environmentp44",
")",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | List finality, client or environment vip list.
Param finality: finality of environment(optional)
Param client: client of environment(optional)
Param environmentp44: environmentp44(optional)
Return finality list: when request has no finality and client.
Return client list: when request has only finality.
Return list environment vip: when request has finality and client.
Return environment vip: when request has finality, client and environmentvip | [
"List",
"finality",
"client",
"or",
"environment",
"vip",
"list",
".",
"Param",
"finality",
":",
"finality",
"of",
"environment",
"(",
"optional",
")",
"Param",
"client",
":",
"client",
"of",
"environment",
"(",
"optional",
")",
"Param",
"environmentp44",
":",
"environmentp44",
"(",
"optional",
")",
"Return",
"finality",
"list",
":",
"when",
"request",
"has",
"no",
"finality",
"and",
"client",
".",
"Return",
"client",
"list",
":",
"when",
"request",
"has",
"only",
"finality",
".",
"Return",
"list",
"environment",
"vip",
":",
"when",
"request",
"has",
"finality",
"and",
"client",
".",
"Return",
"environment",
"vip",
":",
"when",
"request",
"has",
"finality",
"client",
"and",
"environmentvip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L46-L62 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.search | def search(self, **kwargs):
"""
Method to search environments vip based on extends search.
:param search: Dict containing QuerySets to find environments vip.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip
"""
return super(ApiEnvironmentVip, self).get(
self.prepare_url('api/v3/environment-vip/', kwargs)) | python | def search(self, **kwargs):
"""
Method to search environments vip based on extends search.
:param search: Dict containing QuerySets to find environments vip.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip
"""
return super(ApiEnvironmentVip, self).get(
self.prepare_url('api/v3/environment-vip/', kwargs)) | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/environment-vip/'",
",",
"kwargs",
")",
")"
] | Method to search environments vip based on extends search.
:param search: Dict containing QuerySets to find environments vip.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip | [
"Method",
"to",
"search",
"environments",
"vip",
"based",
"on",
"extends",
"search",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L64-L78 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.get | def get(self, ids, **kwargs):
"""
Method to get environments vip by their ids
:param ids: List containing identifiers of environments vip
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip
"""
uri = build_uri_with_ids('api/v3/environment-vip/%s/', ids)
return super(ApiEnvironmentVip, self).get(
self.prepare_url(uri, kwargs)) | python | def get(self, ids, **kwargs):
"""
Method to get environments vip by their ids
:param ids: List containing identifiers of environments vip
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip
"""
uri = build_uri_with_ids('api/v3/environment-vip/%s/', ids)
return super(ApiEnvironmentVip, self).get(
self.prepare_url(uri, kwargs)) | [
"def",
"get",
"(",
"self",
",",
"ids",
",",
"*",
"*",
"kwargs",
")",
":",
"uri",
"=",
"build_uri_with_ids",
"(",
"'api/v3/environment-vip/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"uri",
",",
"kwargs",
")",
")"
] | Method to get environments vip by their ids
:param ids: List containing identifiers of environments vip
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override default fields.
:param kind: Determine if result will be detailed ('detail')
or basic ('basic').
:return: Dict containing environments vip | [
"Method",
"to",
"get",
"environments",
"vip",
"by",
"their",
"ids"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L80-L94 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.delete | def delete(self, ids):
"""
Method to delete environments vip by their id's.
:param ids: Identifiers of environments vip
:return: None
"""
url = build_uri_with_ids('api/v3/environment-vip/%s/', ids)
return super(ApiEnvironmentVip, self).delete(url) | python | def delete(self, ids):
"""
Method to delete environments vip by their id's.
:param ids: Identifiers of environments vip
:return: None
"""
url = build_uri_with_ids('api/v3/environment-vip/%s/', ids)
return super(ApiEnvironmentVip, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/environment-vip/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete environments vip by their id's.
:param ids: Identifiers of environments vip
:return: None | [
"Method",
"to",
"delete",
"environments",
"vip",
"by",
"their",
"id",
"s",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L96-L104 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.update | def update(self, environments):
"""
Method to update environments vip
:param environments vip: List containing environments vip desired
to updated
:return: None
"""
data = {'environments_vip': environments}
environments_ids = [str(env.get('id')) for env in environments]
uri = 'api/v3/environment-vip/%s/' % ';'.join(environments_ids)
return super(ApiEnvironmentVip, self).put(uri, data) | python | def update(self, environments):
"""
Method to update environments vip
:param environments vip: List containing environments vip desired
to updated
:return: None
"""
data = {'environments_vip': environments}
environments_ids = [str(env.get('id')) for env in environments]
uri = 'api/v3/environment-vip/%s/' % ';'.join(environments_ids)
return super(ApiEnvironmentVip, self).put(uri, data) | [
"def",
"update",
"(",
"self",
",",
"environments",
")",
":",
"data",
"=",
"{",
"'environments_vip'",
":",
"environments",
"}",
"environments_ids",
"=",
"[",
"str",
"(",
"env",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"env",
"in",
"environments",
"]",
"uri",
"=",
"'api/v3/environment-vip/%s/'",
"%",
"';'",
".",
"join",
"(",
"environments_ids",
")",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"put",
"(",
"uri",
",",
"data",
")"
] | Method to update environments vip
:param environments vip: List containing environments vip desired
to updated
:return: None | [
"Method",
"to",
"update",
"environments",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L106-L119 |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironmentVip.py | ApiEnvironmentVip.create | def create(self, environments):
"""
Method to create environments vip
:param environments vip: Dict containing environments vip desired
to be created on database
:return: None
"""
data = {'environments_vip': environments}
uri = 'api/v3/environment-vip/'
return super(ApiEnvironmentVip, self).post(uri, data) | python | def create(self, environments):
"""
Method to create environments vip
:param environments vip: Dict containing environments vip desired
to be created on database
:return: None
"""
data = {'environments_vip': environments}
uri = 'api/v3/environment-vip/'
return super(ApiEnvironmentVip, self).post(uri, data) | [
"def",
"create",
"(",
"self",
",",
"environments",
")",
":",
"data",
"=",
"{",
"'environments_vip'",
":",
"environments",
"}",
"uri",
"=",
"'api/v3/environment-vip/'",
"return",
"super",
"(",
"ApiEnvironmentVip",
",",
"self",
")",
".",
"post",
"(",
"uri",
",",
"data",
")"
] | Method to create environments vip
:param environments vip: Dict containing environments vip desired
to be created on database
:return: None | [
"Method",
"to",
"create",
"environments",
"vip"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironmentVip.py#L121-L132 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_ipv4 | def get_ipv4(self, id_ip):
"""Get IPv4 by id.
:param id_ip: ID of IPv4.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv4': < networkipv4 >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'The IPv4 identifier is invalid or was not informed.')
url = 'ip/get-ipv4/' + str(id_ip) + '/'
code, xml = self.submit(None, 'GET', url)
key = 'ipv4'
return get_list_map(self.response(code, xml, ["equipamentos"]), key) | python | def get_ipv4(self, id_ip):
"""Get IPv4 by id.
:param id_ip: ID of IPv4.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv4': < networkipv4 >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'The IPv4 identifier is invalid or was not informed.')
url = 'ip/get-ipv4/' + str(id_ip) + '/'
code, xml = self.submit(None, 'GET', url)
key = 'ipv4'
return get_list_map(self.response(code, xml, ["equipamentos"]), key) | [
"def",
"get_ipv4",
"(",
"self",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The IPv4 identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/get-ipv4/'",
"+",
"str",
"(",
"id_ip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"key",
"=",
"'ipv4'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"xml",
",",
"[",
"\"equipamentos\"",
"]",
")",
",",
"key",
")"
] | Get IPv4 by id.
:param id_ip: ID of IPv4.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv4': < networkipv4 >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Get",
"IPv4",
"by",
"id",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L32-L65 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_ipv6 | def get_ipv6(self, id_ip):
"""Get IPv6 by id.
:param id_ip: ID of IPv6.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv6': < networkipv6 >,
'block1': < block1 >,
'block2': < block2 >,
'block3': < block3 >,
'block4': < block4 >,
'block5': < block5 >,
'block6': < block6 >,
'block7': < block7 >,
'block8': < block8 >,
'description': < description >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'The IPv6 identifier is invalid or was not informed.')
url = 'ip/get-ipv6/' + str(id_ip) + '/'
code, xml = self.submit(None, 'GET', url)
key = 'ipv6'
return get_list_map(self.response(code, xml, ["equipamentos"]), key) | python | def get_ipv6(self, id_ip):
"""Get IPv6 by id.
:param id_ip: ID of IPv6.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv6': < networkipv6 >,
'block1': < block1 >,
'block2': < block2 >,
'block3': < block3 >,
'block4': < block4 >,
'block5': < block5 >,
'block6': < block6 >,
'block7': < block7 >,
'block8': < block8 >,
'description': < description >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'The IPv6 identifier is invalid or was not informed.')
url = 'ip/get-ipv6/' + str(id_ip) + '/'
code, xml = self.submit(None, 'GET', url)
key = 'ipv6'
return get_list_map(self.response(code, xml, ["equipamentos"]), key) | [
"def",
"get_ipv6",
"(",
"self",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The IPv6 identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/get-ipv6/'",
"+",
"str",
"(",
"id_ip",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"key",
"=",
"'ipv6'",
"return",
"get_list_map",
"(",
"self",
".",
"response",
"(",
"code",
",",
"xml",
",",
"[",
"\"equipamentos\"",
"]",
")",
",",
"key",
")"
] | Get IPv6 by id.
:param id_ip: ID of IPv6.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'networkipv6': < networkipv6 >,
'block1': < block1 >,
'block2': < block2 >,
'block3': < block3 >,
'block4': < block4 >,
'block5': < block5 >,
'block6': < block6 >,
'block7': < block7 >,
'block8': < block8 >,
'description': < description >,
'equipamentos': [ { all name of equipments related } ] , }}
:raise IpNaoExisteError: IP is not registered.
:raise InvalidParameterError: IP identifier is null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
:raise XMLError: Networkapi failed to generate the XML response. | [
"Get",
"IPv6",
"by",
"id",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L67-L104 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.buscar_por_ip_ambiente | def buscar_por_ip_ambiente(self, ip, id_environment):
"""Get IP with an associated environment.
:param ip: IP address in the format x1.x2.x3.x4.
:param id_environment: Identifier of the environment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'id_vlan': < id_vlan >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao > }}
:raise IpNaoExisteError: IP is not registered or not associated with environment.
:raise InvalidParameterError: The environment identifier and/or IP is/are null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_environment):
raise InvalidParameterError(
u'Environment identifier is invalid or was not informed.')
if not is_valid_ip(ip):
raise InvalidParameterError(u'IP is invalid or was not informed.')
url = 'ip/' + str(ip) + '/ambiente/' + str(id_environment) + '/'
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | python | def buscar_por_ip_ambiente(self, ip, id_environment):
"""Get IP with an associated environment.
:param ip: IP address in the format x1.x2.x3.x4.
:param id_environment: Identifier of the environment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'id_vlan': < id_vlan >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao > }}
:raise IpNaoExisteError: IP is not registered or not associated with environment.
:raise InvalidParameterError: The environment identifier and/or IP is/are null or invalid.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_environment):
raise InvalidParameterError(
u'Environment identifier is invalid or was not informed.')
if not is_valid_ip(ip):
raise InvalidParameterError(u'IP is invalid or was not informed.')
url = 'ip/' + str(ip) + '/ambiente/' + str(id_environment) + '/'
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | [
"def",
"buscar_por_ip_ambiente",
"(",
"self",
",",
"ip",
",",
"id_environment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_environment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Environment identifier is invalid or was not informed.'",
")",
"if",
"not",
"is_valid_ip",
"(",
"ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'IP is invalid or was not informed.'",
")",
"url",
"=",
"'ip/'",
"+",
"str",
"(",
"ip",
")",
"+",
"'/ambiente/'",
"+",
"str",
"(",
"id_environment",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get IP with an associated environment.
:param ip: IP address in the format x1.x2.x3.x4.
:param id_environment: Identifier of the environment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'id': < id >,
'id_vlan': < id_vlan >,
'oct4': < oct4 >,
'oct3': < oct3 >,
'oct2': < oct2 >,
'oct1': < oct1 >,
'descricao': < descricao > }}
:raise IpNaoExisteError: IP is not registered or not associated with environment.
:raise InvalidParameterError: The environment identifier and/or IP is/are null or invalid.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"IP",
"with",
"an",
"associated",
"environment",
"."
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L106-L140 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_available_ip4 | def get_available_ip4(self, id_network):
"""
Get a available IP in the network ipv4
:param id_network: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'ip': < available_ip >}}
:raise IpNotAvailableError: Network dont have available IP for insert a new IP
:raise NetworkIPv4NotFoundError: Network is not found
:raise UserNotAuthorizedError: User dont have permission to get a available IP
:raise InvalidParameterError: Network identifier is null or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_network):
raise InvalidParameterError(
u'Network identifier is invalid or was not informed.')
url = 'ip/availableip4/' + str(id_network) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | python | def get_available_ip4(self, id_network):
"""
Get a available IP in the network ipv4
:param id_network: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'ip': < available_ip >}}
:raise IpNotAvailableError: Network dont have available IP for insert a new IP
:raise NetworkIPv4NotFoundError: Network is not found
:raise UserNotAuthorizedError: User dont have permission to get a available IP
:raise InvalidParameterError: Network identifier is null or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_network):
raise InvalidParameterError(
u'Network identifier is invalid or was not informed.')
url = 'ip/availableip4/' + str(id_network) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | [
"def",
"get_available_ip4",
"(",
"self",
",",
"id_network",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Network identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/availableip4/'",
"+",
"str",
"(",
"id_network",
")",
"+",
"\"/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get a available IP in the network ipv4
:param id_network: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip': {'ip': < available_ip >}}
:raise IpNotAvailableError: Network dont have available IP for insert a new IP
:raise NetworkIPv4NotFoundError: Network is not found
:raise UserNotAuthorizedError: User dont have permission to get a available IP
:raise InvalidParameterError: Network identifier is null or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"a",
"available",
"IP",
"in",
"the",
"network",
"ipv4"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L142-L170 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_ip_by_equip_and_vip | def get_ip_by_equip_and_vip(self, equip_name, id_evip):
"""
Get a available IP in the Equipment related Environment VIP
:param equip_name: Equipment Name.
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ 'ipv4': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ],
'ipv6': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ] }
:raise InvalidParameterError: Vip environment identifier or equipment name is none or invalid.
:raise EquipamentoNotFoundError: Equipment not registered.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_evip):
raise InvalidParameterError(
u'Vip environment is invalid or was not informed.')
ip_map = dict()
ip_map['equip_name'] = equip_name
ip_map['id_evip'] = id_evip
url = "ip/getbyequipandevip/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def get_ip_by_equip_and_vip(self, equip_name, id_evip):
"""
Get a available IP in the Equipment related Environment VIP
:param equip_name: Equipment Name.
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ 'ipv4': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ],
'ipv6': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ] }
:raise InvalidParameterError: Vip environment identifier or equipment name is none or invalid.
:raise EquipamentoNotFoundError: Equipment not registered.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_evip):
raise InvalidParameterError(
u'Vip environment is invalid or was not informed.')
ip_map = dict()
ip_map['equip_name'] = equip_name
ip_map['id_evip'] = id_evip
url = "ip/getbyequipandevip/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"get_ip_by_equip_and_vip",
"(",
"self",
",",
"equip_name",
",",
"id_evip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_evip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Vip environment is invalid or was not informed.'",
")",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'equip_name'",
"]",
"=",
"equip_name",
"ip_map",
"[",
"'id_evip'",
"]",
"=",
"id_evip",
"url",
"=",
"\"ip/getbyequipandevip/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get a available IP in the Equipment related Environment VIP
:param equip_name: Equipment Name.
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ 'ipv4': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ],
'ipv6': [ {'id': < id >, 'ip': < ip >, 'network': { 'id': < id >, 'network': < network >, 'mask': < mask >, }} ... ] }
:raise InvalidParameterError: Vip environment identifier or equipment name is none or invalid.
:raise EquipamentoNotFoundError: Equipment not registered.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"a",
"available",
"IP",
"in",
"the",
"Equipment",
"related",
"Environment",
"VIP"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L172-L206 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_ipv4_or_ipv6 | def get_ipv4_or_ipv6(self, ip):
"""
Get a Ipv4 or Ipv6 by IP
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ips': [{'oct4': < oct4 >, 'oct2': < oct2 >, 'oct3': < oct3 >,
'oct1': < oct1 >, 'version': < version >,
'networkipv4': < networkipv4 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
or
{'ips': [ {'block1': < block1 >, 'block2': < block2 >, 'block3': < block3 >, 'block4': < block4 >, 'block5': < block5 >, 'block6': < block6 >, 'block7': < block7 >, 'block8': < block8 >,
'version': < version >, 'networkipv6': < networkipv6 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
ip_map = dict()
ip_map['ip'] = ip
url = "ip/getbyoctblock/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def get_ipv4_or_ipv6(self, ip):
"""
Get a Ipv4 or Ipv6 by IP
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ips': [{'oct4': < oct4 >, 'oct2': < oct2 >, 'oct3': < oct3 >,
'oct1': < oct1 >, 'version': < version >,
'networkipv4': < networkipv4 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
or
{'ips': [ {'block1': < block1 >, 'block2': < block2 >, 'block3': < block3 >, 'block4': < block4 >, 'block5': < block5 >, 'block6': < block6 >, 'block7': < block7 >, 'block8': < block8 >,
'version': < version >, 'networkipv6': < networkipv6 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
ip_map = dict()
ip_map['ip'] = ip
url = "ip/getbyoctblock/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"get_ipv4_or_ipv6",
"(",
"self",
",",
"ip",
")",
":",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'ip'",
"]",
"=",
"ip",
"url",
"=",
"\"ip/getbyoctblock/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get a Ipv4 or Ipv6 by IP
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ips': [{'oct4': < oct4 >, 'oct2': < oct2 >, 'oct3': < oct3 >,
'oct1': < oct1 >, 'version': < version >,
'networkipv4': < networkipv4 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
or
{'ips': [ {'block1': < block1 >, 'block2': < block2 >, 'block3': < block3 >, 'block4': < block4 >, 'block5': < block5 >, 'block6': < block6 >, 'block7': < block7 >, 'block8': < block8 >,
'version': < version >, 'networkipv6': < networkipv6 >, 'id': < id >, 'descricao': < descricao >}, ... ] }.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"a",
"Ipv4",
"or",
"Ipv6",
"by",
"IP"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L208-L239 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.check_vip_ip | def check_vip_ip(self, ip, id_evip):
"""
Get a Ipv4 or Ipv6 for Vip request
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ip': {'ip': < ip - octs for ipv4, blocks for ipv6 - >,
'id': <id>,
'network4 or network6'}}.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise EnvironemntVipNotFoundError: Vip environment not found.
:raise IPNaoDisponivelError: Ip not available for Vip Environment.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string or vip environment is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
ip_map = dict()
ip_map['ip'] = ip
ip_map['id_evip'] = id_evip
url = "ip/checkvipip/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def check_vip_ip(self, ip, id_evip):
"""
Get a Ipv4 or Ipv6 for Vip request
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ip': {'ip': < ip - octs for ipv4, blocks for ipv6 - >,
'id': <id>,
'network4 or network6'}}.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise EnvironemntVipNotFoundError: Vip environment not found.
:raise IPNaoDisponivelError: Ip not available for Vip Environment.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string or vip environment is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
ip_map = dict()
ip_map['ip'] = ip
ip_map['id_evip'] = id_evip
url = "ip/checkvipip/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"check_vip_ip",
"(",
"self",
",",
"ip",
",",
"id_evip",
")",
":",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'ip'",
"]",
"=",
"ip",
"ip_map",
"[",
"'id_evip'",
"]",
"=",
"id_evip",
"url",
"=",
"\"ip/checkvipip/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get a Ipv4 or Ipv6 for Vip request
:param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
:return: Dictionary with the following structure:
::
{'ip': {'ip': < ip - octs for ipv4, blocks for ipv6 - >,
'id': <id>,
'network4 or network6'}}.
:raise IpNaoExisteError: Ipv4 or Ipv6 not found.
:raise EnvironemntVipNotFoundError: Vip environment not found.
:raise IPNaoDisponivelError: Ip not available for Vip Environment.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip string or vip environment is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"a",
"Ipv4",
"or",
"Ipv6",
"for",
"Vip",
"request"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L241-L273 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_available_ip6 | def get_available_ip6(self, id_network6):
"""
Get a available IP in Network ipv6
:param id_network6: Network ipv6 identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip6': {'ip6': < available_ip6 >}}
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to get a available IP.
:raise InvalidParameterError: Network ipv6 identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_network6):
raise InvalidParameterError(
u'Network ipv6 identifier is invalid or was not informed.')
url = 'ip/availableip6/' + str(id_network6) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | python | def get_available_ip6(self, id_network6):
"""
Get a available IP in Network ipv6
:param id_network6: Network ipv6 identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip6': {'ip6': < available_ip6 >}}
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to get a available IP.
:raise InvalidParameterError: Network ipv6 identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_network6):
raise InvalidParameterError(
u'Network ipv6 identifier is invalid or was not informed.')
url = 'ip/availableip6/' + str(id_network6) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | [
"def",
"get_available_ip6",
"(",
"self",
",",
"id_network6",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network6",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Network ipv6 identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/availableip6/'",
"+",
"str",
"(",
"id_network6",
")",
"+",
"\"/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get a available IP in Network ipv6
:param id_network6: Network ipv6 identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'ip6': {'ip6': < available_ip6 >}}
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to get a available IP.
:raise InvalidParameterError: Network ipv6 identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"a",
"available",
"IP",
"in",
"Network",
"ipv6"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L275-L304 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.get_available_ip6_for_vip | def get_available_ip6_for_vip(self, id_evip, name):
"""
Get and save a available IP in the network ipv6 for vip request
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:param name: Ip description
:return: Dictionary with the following structure:
::
{'ip': {'bloco1':<bloco1>,
'bloco2':<bloco2>,
'bloco3':<bloco3>,
'bloco4':<bloco4>,
'bloco5':<bloco5>,
'bloco6':<bloco6>,
'bloco7':<bloco7>,
'bloco8':<bloco8>,
'id':<id>,
'networkipv6':<networkipv6>,
'description':<description>}}
:raise IpNotAvailableError: Network dont have available IP for vip environment.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Vip environment identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_evip):
raise InvalidParameterError(
u'Vip environment identifier is invalid or was not informed.')
url = 'ip/availableip6/vip/' + str(id_evip) + "/"
ip_map = dict()
ip_map['id_evip'] = id_evip
ip_map['name'] = name
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def get_available_ip6_for_vip(self, id_evip, name):
"""
Get and save a available IP in the network ipv6 for vip request
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:param name: Ip description
:return: Dictionary with the following structure:
::
{'ip': {'bloco1':<bloco1>,
'bloco2':<bloco2>,
'bloco3':<bloco3>,
'bloco4':<bloco4>,
'bloco5':<bloco5>,
'bloco6':<bloco6>,
'bloco7':<bloco7>,
'bloco8':<bloco8>,
'id':<id>,
'networkipv6':<networkipv6>,
'description':<description>}}
:raise IpNotAvailableError: Network dont have available IP for vip environment.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Vip environment identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_evip):
raise InvalidParameterError(
u'Vip environment identifier is invalid or was not informed.')
url = 'ip/availableip6/vip/' + str(id_evip) + "/"
ip_map = dict()
ip_map['id_evip'] = id_evip
ip_map['name'] = name
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"get_available_ip6_for_vip",
"(",
"self",
",",
"id_evip",
",",
"name",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_evip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Vip environment identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/availableip6/vip/'",
"+",
"str",
"(",
"id_evip",
")",
"+",
"\"/\"",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'id_evip'",
"]",
"=",
"id_evip",
"ip_map",
"[",
"'name'",
"]",
"=",
"name",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get and save a available IP in the network ipv6 for vip request
:param id_evip: Vip environment identifier. Integer value and greater than zero.
:param name: Ip description
:return: Dictionary with the following structure:
::
{'ip': {'bloco1':<bloco1>,
'bloco2':<bloco2>,
'bloco3':<bloco3>,
'bloco4':<bloco4>,
'bloco5':<bloco5>,
'bloco6':<bloco6>,
'bloco7':<bloco7>,
'bloco8':<bloco8>,
'id':<id>,
'networkipv6':<networkipv6>,
'description':<description>}}
:raise IpNotAvailableError: Network dont have available IP for vip environment.
:raise EnvironmentVipNotFoundError: Vip environment not registered.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Vip environment identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"and",
"save",
"a",
"available",
"IP",
"in",
"the",
"network",
"ipv6",
"for",
"vip",
"request"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L306-L350 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.edit_ipv4 | def edit_ipv4(self, ip4, descricao, id_ip):
"""
Edit a IP4
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_ip: IP identifier. Integer value and greater than zero.
:param descricao: IP description.
:return: None
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ip identifier is invalid or was not informed.')
if ip4 is None or ip4 == "":
raise InvalidParameterError(
u'The IP4 is invalid or was not informed.')
ip_map = dict()
ip_map['descricao'] = descricao
ip_map['ip4'] = ip4
ip_map['id_ip'] = id_ip
url = "ip4/edit/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def edit_ipv4(self, ip4, descricao, id_ip):
"""
Edit a IP4
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_ip: IP identifier. Integer value and greater than zero.
:param descricao: IP description.
:return: None
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ip identifier is invalid or was not informed.')
if ip4 is None or ip4 == "":
raise InvalidParameterError(
u'The IP4 is invalid or was not informed.')
ip_map = dict()
ip_map['descricao'] = descricao
ip_map['ip4'] = ip4
ip_map['id_ip'] = id_ip
url = "ip4/edit/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"edit_ipv4",
"(",
"self",
",",
"ip4",
",",
"descricao",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Ip identifier is invalid or was not informed.'",
")",
"if",
"ip4",
"is",
"None",
"or",
"ip4",
"==",
"\"\"",
":",
"raise",
"InvalidParameterError",
"(",
"u'The IP4 is invalid or was not informed.'",
")",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'descricao'",
"]",
"=",
"descricao",
"ip_map",
"[",
"'ip4'",
"]",
"=",
"ip4",
"ip_map",
"[",
"'id_ip'",
"]",
"=",
"id_ip",
"url",
"=",
"\"ip4/edit/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Edit a IP4
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_ip: IP identifier. Integer value and greater than zero.
:param descricao: IP description.
:return: None | [
"Edit",
"a",
"IP4"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L395-L423 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.save_ipv4 | def save_ipv4(self, ip4, id_equip, descricao, id_net):
"""
Save a IP4 and associate with equipment
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_equip: Equipment identifier. Integer value and greater than zero.
:param descricao: IP description.
:param id_net: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ip: { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ { all equipamentos related } ] ,
descricao: <descricao> } }
"""
if not is_valid_int_param(id_net):
raise InvalidParameterError(
u'Network identifier is invalid or was not informed.')
if not is_valid_int_param(id_equip):
raise InvalidParameterError(
u'Equipment identifier is invalid or was not informed.')
if ip4 is None or ip4 == "":
raise InvalidParameterError(u'IP4 is invalid or was not informed.')
ip_map = dict()
ip_map['id_net'] = id_net
ip_map['descricao'] = descricao
ip_map['ip4'] = ip4
ip_map['id_equip'] = id_equip
url = "ipv4/save/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def save_ipv4(self, ip4, id_equip, descricao, id_net):
"""
Save a IP4 and associate with equipment
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_equip: Equipment identifier. Integer value and greater than zero.
:param descricao: IP description.
:param id_net: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ip: { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ { all equipamentos related } ] ,
descricao: <descricao> } }
"""
if not is_valid_int_param(id_net):
raise InvalidParameterError(
u'Network identifier is invalid or was not informed.')
if not is_valid_int_param(id_equip):
raise InvalidParameterError(
u'Equipment identifier is invalid or was not informed.')
if ip4 is None or ip4 == "":
raise InvalidParameterError(u'IP4 is invalid or was not informed.')
ip_map = dict()
ip_map['id_net'] = id_net
ip_map['descricao'] = descricao
ip_map['ip4'] = ip4
ip_map['id_equip'] = id_equip
url = "ipv4/save/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"save_ipv4",
"(",
"self",
",",
"ip4",
",",
"id_equip",
",",
"descricao",
",",
"id_net",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_net",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Network identifier is invalid or was not informed.'",
")",
"if",
"not",
"is_valid_int_param",
"(",
"id_equip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Equipment identifier is invalid or was not informed.'",
")",
"if",
"ip4",
"is",
"None",
"or",
"ip4",
"==",
"\"\"",
":",
"raise",
"InvalidParameterError",
"(",
"u'IP4 is invalid or was not informed.'",
")",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'id_net'",
"]",
"=",
"id_net",
"ip_map",
"[",
"'descricao'",
"]",
"=",
"descricao",
"ip_map",
"[",
"'ip4'",
"]",
"=",
"ip4",
"ip_map",
"[",
"'id_equip'",
"]",
"=",
"id_equip",
"url",
"=",
"\"ipv4/save/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Save a IP4 and associate with equipment
:param ip4: An IP4 available to save in format x.x.x.x.
:param id_equip: Equipment identifier. Integer value and greater than zero.
:param descricao: IP description.
:param id_net: Network identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ip: { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ { all equipamentos related } ] ,
descricao: <descricao> } } | [
"Save",
"a",
"IP4",
"and",
"associate",
"with",
"equipment"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L425-L467 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.edit_ipv6 | def edit_ipv6(self, ip6, descricao, id_ip):
"""
Edit a IP6
:param ip6: An IP6 available to save in format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.
:param descricao: IP description.
:param id_ip: Ipv6 identifier. Integer value and greater than zero.
:return: None
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ipv6 identifier is invalid or was not informed.')
if ip6 is None or ip6 == "":
raise InvalidParameterError(u'IP6 is invalid or was not informed.')
ip_map = dict()
ip_map['descricao'] = descricao
ip_map['ip6'] = ip6
ip_map['id_ip'] = id_ip
url = "ipv6/edit/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | python | def edit_ipv6(self, ip6, descricao, id_ip):
"""
Edit a IP6
:param ip6: An IP6 available to save in format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.
:param descricao: IP description.
:param id_ip: Ipv6 identifier. Integer value and greater than zero.
:return: None
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ipv6 identifier is invalid or was not informed.')
if ip6 is None or ip6 == "":
raise InvalidParameterError(u'IP6 is invalid or was not informed.')
ip_map = dict()
ip_map['descricao'] = descricao
ip_map['ip6'] = ip6
ip_map['id_ip'] = id_ip
url = "ipv6/edit/"
code, xml = self.submit({'ip_map': ip_map}, 'POST', url)
return self.response(code, xml) | [
"def",
"edit_ipv6",
"(",
"self",
",",
"ip6",
",",
"descricao",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Ipv6 identifier is invalid or was not informed.'",
")",
"if",
"ip6",
"is",
"None",
"or",
"ip6",
"==",
"\"\"",
":",
"raise",
"InvalidParameterError",
"(",
"u'IP6 is invalid or was not informed.'",
")",
"ip_map",
"=",
"dict",
"(",
")",
"ip_map",
"[",
"'descricao'",
"]",
"=",
"descricao",
"ip_map",
"[",
"'ip6'",
"]",
"=",
"ip6",
"ip_map",
"[",
"'id_ip'",
"]",
"=",
"id_ip",
"url",
"=",
"\"ipv6/edit/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'ip_map'",
":",
"ip_map",
"}",
",",
"'POST'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Edit a IP6
:param ip6: An IP6 available to save in format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.
:param descricao: IP description.
:param id_ip: Ipv6 identifier. Integer value and greater than zero.
:return: None | [
"Edit",
"a",
"IP6"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L469-L496 |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ip.py | Ip.find_ip4_by_id | def find_ip4_by_id(self, id_ip):
"""
Get an IP by ID
:param id_ip: IP identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ips { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ {all equipamentos related} ] ,
descricao: <descricao>} }
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ip identifier is invalid or was not informed.')
url = 'ip/get/' + str(id_ip) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | python | def find_ip4_by_id(self, id_ip):
"""
Get an IP by ID
:param id_ip: IP identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ips { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ {all equipamentos related} ] ,
descricao: <descricao>} }
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database.
"""
if not is_valid_int_param(id_ip):
raise InvalidParameterError(
u'Ip identifier is invalid or was not informed.')
url = 'ip/get/' + str(id_ip) + "/"
code, xml = self.submit(None, 'GET', url)
return self.response(code, xml) | [
"def",
"find_ip4_by_id",
"(",
"self",
",",
"id_ip",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ip",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Ip identifier is invalid or was not informed.'",
")",
"url",
"=",
"'ip/get/'",
"+",
"str",
"(",
"id_ip",
")",
"+",
"\"/\"",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
"(",
"code",
",",
"xml",
")"
] | Get an IP by ID
:param id_ip: IP identifier. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{ ips { id: <id_ip4>,
oct1: <oct1>,
oct2: <oct2>,
oct3: <oct3>,
oct4: <oct4>,
equipamento: [ {all equipamentos related} ] ,
descricao: <descricao>} }
:raise IpNotAvailableError: Network dont have available IP.
:raise NetworkIPv4NotFoundError: Network was not found.
:raise UserNotAuthorizedError: User dont have permission to perform operation.
:raise InvalidParameterError: Ip identifier is none or invalid.
:raise XMLError: Networkapi failed to generate the XML response.
:raise DataBaseError: Networkapi failed to access the database. | [
"Get",
"an",
"IP",
"by",
"ID"
] | train | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ip.py#L498-L533 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.