repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.get_environment_template | def get_environment_template(self, name, network):
"""Get environments by template name
:param name: Template name.
:param network: IPv4 or IPv6.
:return: Following dictionary:
::
{'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] }
:ra... | python | def get_environment_template(self, name, network):
"""Get environments by template name
:param name: Template name.
:param network: IPv4 or IPv6.
:return: Following dictionary:
::
{'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] }
:ra... | [
"def",
"get_environment_template",
"(",
"self",
",",
"name",
",",
"network",
")",
":",
"url",
"=",
"'environment/get_env_template/'",
"map_dict",
"=",
"dict",
"(",
")",
"map_dict",
"[",
"'name'",
"]",
"=",
"name",
"map_dict",
"[",
"'network'",
"]",
"=",
"net... | Get environments by template name
:param name: Template name.
:param network: IPv4 or IPv6.
:return: Following dictionary:
::
{'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] }
:raise InvalidParameterError: Invalid param.
:raise DataB... | [
"Get",
"environments",
"by",
"template",
"name"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L640-L664 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.save_blocks | def save_blocks(self, id_env, blocks):
"""
Save blocks from environment
:param id_env: Environment id
:param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...]
:return: None
:raise AmbienteNaoExisteError: Ambiente não cadastrado.
:raise I... | python | def save_blocks(self, id_env, blocks):
"""
Save blocks from environment
:param id_env: Environment id
:param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...]
:return: None
:raise AmbienteNaoExisteError: Ambiente não cadastrado.
:raise I... | [
"def",
"save_blocks",
"(",
"self",
",",
"id_env",
",",
"blocks",
")",
":",
"url",
"=",
"'environment/save_blocks/'",
"map_dict",
"=",
"dict",
"(",
")",
"map_dict",
"[",
"'id_env'",
"]",
"=",
"id_env",
"map_dict",
"[",
"'blocks'",
"]",
"=",
"blocks",
"code"... | Save blocks from environment
:param id_env: Environment id
:param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...]
:return: None
:raise AmbienteNaoExisteError: Ambiente não cadastrado.
:raise InvalidValueError: Invalid parameter.
:raise UserNot... | [
"Save",
"blocks",
"from",
"environment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L666-L691 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.get_rule_by_pk | def get_rule_by_pk(self, id_rule):
"""
Get a rule by its identifier
:param id_rule: Rule identifier.
:return: Seguinte estrutura
::
{ 'rule': {'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'n... | python | def get_rule_by_pk(self, id_rule):
"""
Get a rule by its identifier
:param id_rule: Rule identifier.
:return: Seguinte estrutura
::
{ 'rule': {'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'n... | [
"def",
"get_rule_by_pk",
"(",
"self",
",",
"id_rule",
")",
":",
"url",
"=",
"'rule/get_by_id/'",
"+",
"str",
"(",
"id_rule",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"resp... | Get a rule by its identifier
:param id_rule: Rule identifier.
:return: Seguinte estrutura
::
{ 'rule': {'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'name': < name >,
'custom': < custom > }}
... | [
"Get",
"a",
"rule",
"by",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L774-L798 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.save_rule | def save_rule(self, name, id_env, contents, blocks_id):
"""
Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blocks id or 0... | python | def save_rule(self, name, id_env, contents, blocks_id):
"""
Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blocks id or 0... | [
"def",
"save_rule",
"(",
"self",
",",
"name",
",",
"id_env",
",",
"contents",
",",
"blocks_id",
")",
":",
"url",
"=",
"'rule/save/'",
"map_dict",
"=",
"dict",
"(",
")",
"map_dict",
"[",
"'name'",
"]",
"=",
"name",
"map_dict",
"[",
"'id_env'",
"]",
"=",... | Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...]
:return: None
... | [
"Save",
"an",
"environment",
"rule"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L800-L829 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.update_rule | def update_rule(self, name, id_env, contents, blocks_id, id_rule):
"""
Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blo... | python | def update_rule(self, name, id_env, contents, blocks_id, id_rule):
"""
Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blo... | [
"def",
"update_rule",
"(",
"self",
",",
"name",
",",
"id_env",
",",
"contents",
",",
"blocks_id",
",",
"id_rule",
")",
":",
"url",
"=",
"'rule/update/'",
"map_dict",
"=",
"dict",
"(",
")",
"map_dict",
"[",
"'name'",
"]",
"=",
"name",
"map_dict",
"[",
"... | Save an environment rule
:param name: Name of the rule
:param id_env: Environment id
:param contents: Lists of contents in order. Ex: ['content one', 'content two', ...]
:param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...]
:param id_rule: Ru... | [
"Save",
"an",
"environment",
"rule"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L831-L865 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.get_all_rules | def get_all_rules(self, id_env):
"""Save an environment rule
:param id_env: Environment id
:return: Estrutura:
::
{ 'rules': [{'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'name': < name >,
'c... | python | def get_all_rules(self, id_env):
"""Save an environment rule
:param id_env: Environment id
:return: Estrutura:
::
{ 'rules': [{'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'name': < name >,
'c... | [
"def",
"get_all_rules",
"(",
"self",
",",
"id_env",
")",
":",
"url",
"=",
"'rule/all/'",
"+",
"str",
"(",
"id_env",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"response",
... | Save an environment rule
:param id_env: Environment id
:return: Estrutura:
::
{ 'rules': [{'id': < id >,
'environment': < Environment Object >,
'content': < content >,
'name': < name >,
'custom': < custom > },... ]}
:raise ... | [
"Save",
"an",
"environment",
"rule"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L888-L911 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.configuration_save | def configuration_save(
self,
id_environment,
network,
prefix,
ip_version,
network_type):
"""
Add new prefix configuration
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:... | python | def configuration_save(
self,
id_environment,
network,
prefix,
ip_version,
network_type):
"""
Add new prefix configuration
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:... | [
"def",
"configuration_save",
"(",
"self",
",",
"id_environment",
",",
"network",
",",
"prefix",
",",
"ip_version",
",",
"network_type",
")",
":",
"network_map",
"=",
"dict",
"(",
")",
"network_map",
"[",
"'id_environment'",
"]",
"=",
"id_environment",
"network_m... | Add new prefix configuration
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:param network: Network Ipv4 or Ipv6.
:param prefix: Prefix 0-32 to Ipv4 or 0-128 to Ipv6.
:param ip_version: v4 to IPv4 or v6 to IPv6
:param network_type: typ... | [
"Add",
"new",
"prefix",
"configuration"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L913-L955 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.configuration_list_all | def configuration_list_all(self, environment_id):
"""
List all prefix configurations by environment in DB
:return: Following dictionary:
::
{'lists_configuration': [{
'id': <id_ipconfig>,
'subnet': <subnet>,
'type': <type>,
'... | python | def configuration_list_all(self, environment_id):
"""
List all prefix configurations by environment in DB
:return: Following dictionary:
::
{'lists_configuration': [{
'id': <id_ipconfig>,
'subnet': <subnet>,
'type': <type>,
'... | [
"def",
"configuration_list_all",
"(",
"self",
",",
"environment_id",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"environment_id\"",
"]",
"=",
"environment_id",
"url",
"=",
"(",
"\"environment/configuration/list/%(environment_id)s/\"",
"%",
"data",
")",
... | List all prefix configurations by environment in DB
:return: Following dictionary:
::
{'lists_configuration': [{
'id': <id_ipconfig>,
'subnet': <subnet>,
'type': <type>,
'new_prefix': <new_prefix>,
}, ... ]}
:raise Inva... | [
"List",
"all",
"prefix",
"configurations",
"by",
"environment",
"in",
"DB"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L957-L986 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.configuration_remove | def configuration_remove(self, environment_id, configuration_id):
"""
Remove Prefix Configuration
:return: None
:raise InvalidValueError: Invalid Id for Environment or IpConfig.
:raise IPConfigNotFoundError: Ipconfig not resgistred.
:raise AmbienteNotFoundError: Environ... | python | def configuration_remove(self, environment_id, configuration_id):
"""
Remove Prefix Configuration
:return: None
:raise InvalidValueError: Invalid Id for Environment or IpConfig.
:raise IPConfigNotFoundError: Ipconfig not resgistred.
:raise AmbienteNotFoundError: Environ... | [
"def",
"configuration_remove",
"(",
"self",
",",
"environment_id",
",",
"configuration_id",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"configuration_id\"",
"]",
"=",
"configuration_id",
"data",
"[",
"\"environment_id\"",
"]",
"=",
"environment_id",
... | Remove Prefix Configuration
:return: None
:raise InvalidValueError: Invalid Id for Environment or IpConfig.
:raise IPConfigNotFoundError: Ipconfig not resgistred.
:raise AmbienteNotFoundError: Environment not registered.
:raise DataBaseError: Failed into networkapi access data ... | [
"Remove",
"Prefix",
"Configuration"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L988-L1013 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.associate | def associate(self, environment_id, environment_vip_id):
"""Associate a news Environment on Environment VIP and returns its identifier.
:param environment_id: Identifier of the Environment. Integer value and greater than zero.
:param environment_vip_id: Identifier of the Environment VIP. Integ... | python | def associate(self, environment_id, environment_vip_id):
"""Associate a news Environment on Environment VIP and returns its identifier.
:param environment_id: Identifier of the Environment. Integer value and greater than zero.
:param environment_vip_id: Identifier of the Environment VIP. Integ... | [
"def",
"associate",
"(",
"self",
",",
"environment_id",
",",
"environment_vip_id",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"environment_id",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Environment VIP is invalid or was not informed.'",
")... | Associate a news Environment on Environment VIP and returns its identifier.
:param environment_id: Identifier of the Environment. Integer value and greater than zero.
:param environment_vip_id: Identifier of the Environment VIP. Integer value and greater than zero.
:return: Following dictionar... | [
"Associate",
"a",
"news",
"Environment",
"on",
"Environment",
"VIP",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L1015-L1048 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Ambiente.py | Ambiente.get_related_environment_list | def get_related_environment_list(self, environment_vip_id):
"""Get all Environment by Environment Vip.
:return: Following dictionary:
::
{'ambiente': [{ 'id': <id_environment>,
'grupo_l3': <id_group_l3>,
'grupo_l3_name': <name_group_l3>,
'ambien... | python | def get_related_environment_list(self, environment_vip_id):
"""Get all Environment by Environment Vip.
:return: Following dictionary:
::
{'ambiente': [{ 'id': <id_environment>,
'grupo_l3': <id_group_l3>,
'grupo_l3_name': <name_group_l3>,
'ambien... | [
"def",
"get_related_environment_list",
"(",
"self",
",",
"environment_vip_id",
")",
":",
"url",
"=",
"'environment/environmentvip/{}/'",
".",
"format",
"(",
"environment_vip_id",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
","... | Get all Environment by Environment Vip.
:return: Following dictionary:
::
{'ambiente': [{ 'id': <id_environment>,
'grupo_l3': <id_group_l3>,
'grupo_l3_name': <name_group_l3>,
'ambiente_logico': <id_logical_environment>,
'ambiente_logico_name... | [
"Get",
"all",
"Environment",
"by",
"Environment",
"Vip",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L1085-L1113 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEquipment.py | ApiEquipment.get_equipment | def get_equipment(self, **kwargs):
"""
Return list environments related with environment vip
"""
uri = 'api/v3/equipment/'
uri = self.prepare_url(uri, kwargs)
return super(ApiEquipment, self).get(uri) | python | def get_equipment(self, **kwargs):
"""
Return list environments related with environment vip
"""
uri = 'api/v3/equipment/'
uri = self.prepare_url(uri, kwargs)
return super(ApiEquipment, self).get(uri) | [
"def",
"get_equipment",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"uri",
"=",
"'api/v3/equipment/'",
"uri",
"=",
"self",
".",
"prepare_url",
"(",
"uri",
",",
"kwargs",
")",
"return",
"super",
"(",
"ApiEquipment",
",",
"self",
")",
".",
"get",
"("... | Return list environments related with environment vip | [
"Return",
"list",
"environments",
"related",
"with",
"environment",
"vip"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L36-L44 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEquipment.py | ApiEquipment.search | def search(self, **kwargs):
"""
Method to search equipments based on extends search.
:param search: Dict containing QuerySets to find equipments.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
... | python | def search(self, **kwargs):
"""
Method to search equipments based on extends search.
:param search: Dict containing QuerySets to find equipments.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiEquipment",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/equipment/'",
",",
"kwargs",
")",
")"
] | Method to search equipments based on extends search.
:param search: Dict containing QuerySets to find equipments.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to ov... | [
"Method",
"to",
"search",
"equipments",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L46-L59 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEquipment.py | ApiEquipment.delete | def delete(self, ids):
"""
Method to delete equipments by their id's
:param ids: Identifiers of equipments
:return: None
"""
url = build_uri_with_ids('api/v3/equipment/%s/', ids)
return super(ApiEquipment, self).delete(url) | python | def delete(self, ids):
"""
Method to delete equipments by their id's
:param ids: Identifiers of equipments
:return: None
"""
url = build_uri_with_ids('api/v3/equipment/%s/', ids)
return super(ApiEquipment, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/equipment/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiEquipment",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete equipments by their id's
:param ids: Identifiers of equipments
:return: None | [
"Method",
"to",
"delete",
"equipments",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L75-L83 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEquipment.py | ApiEquipment.create | def create(self, equipments):
"""
Method to create equipments
:param equipments: List containing equipments desired to be created on database
:return: None
"""
data = {'equipments': equipments}
return super(ApiEquipment, self).post('api/v3/equipment/', data) | python | def create(self, equipments):
"""
Method to create equipments
:param equipments: List containing equipments desired to be created on database
:return: None
"""
data = {'equipments': equipments}
return super(ApiEquipment, self).post('api/v3/equipment/', data) | [
"def",
"create",
"(",
"self",
",",
"equipments",
")",
":",
"data",
"=",
"{",
"'equipments'",
":",
"equipments",
"}",
"return",
"super",
"(",
"ApiEquipment",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/equipment/'",
",",
"data",
")"
] | Method to create equipments
:param equipments: List containing equipments desired to be created on database
:return: None | [
"Method",
"to",
"create",
"equipments"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L99-L108 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPoolDeploy.py | ApiPoolDeploy.delete | def delete(self, ids):
"""
Method to undeploy pool's by their ids
:param ids: Identifiers of deployed pool's
:return: Empty Dict
"""
url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids)
return super(ApiPoolDeploy, self).delete(url) | python | def delete(self, ids):
"""
Method to undeploy pool's by their ids
:param ids: Identifiers of deployed pool's
:return: Empty Dict
"""
url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids)
return super(ApiPoolDeploy, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/pool/deploy/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiPoolDeploy",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to undeploy pool's by their ids
:param ids: Identifiers of deployed pool's
:return: Empty Dict | [
"Method",
"to",
"undeploy",
"pool",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPoolDeploy.py#L36-L45 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiPoolDeploy.py | ApiPoolDeploy.create | def create(self, ids):
"""
Method to deploy pool's
:param pools: Identifiers of pool's desired to be deployed
:return: Empty Dict
"""
url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids)
return super(ApiPoolDeploy, self).post(url) | python | def create(self, ids):
"""
Method to deploy pool's
:param pools: Identifiers of pool's desired to be deployed
:return: Empty Dict
"""
url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids)
return super(ApiPoolDeploy, self).post(url) | [
"def",
"create",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/pool/deploy/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiPoolDeploy",
",",
"self",
")",
".",
"post",
"(",
"url",
")"
] | Method to deploy pool's
:param pools: Identifiers of pool's desired to be deployed
:return: Empty Dict | [
"Method",
"to",
"deploy",
"pool",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPoolDeploy.py#L62-L71 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Vip.py | Vip.edit_reals | def edit_reals(
self,
id_vip,
method_bal,
reals,
reals_prioritys,
reals_weights,
alter_priority=0):
"""Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals.
:param... | python | def edit_reals(
self,
id_vip,
method_bal,
reals,
reals_prioritys,
reals_weights,
alter_priority=0):
"""Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals.
:param... | [
"def",
"edit_reals",
"(",
"self",
",",
"id_vip",
",",
"method_bal",
",",
"reals",
",",
"reals_prioritys",
",",
"reals_weights",
",",
"alter_priority",
"=",
"0",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_vip",
")",
":",
"raise",
"InvalidParameterErr... | Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals.
:param id_vip: Identifier of the VIP. Integer value and greater than zero.
:param method_bal: method_bal.
:param reals: List of reals. Ex: [{'real_name':'Teste1', 'real_ip':'10.10.10.1'... | [
"Execute",
"the",
"script",
"gerador_vips",
"several",
"times",
"with",
"options",
"-",
"real",
"-",
"add",
"and",
"-",
"del",
"to",
"adjust",
"vip",
"request",
"reals",
".",
":",
"param",
"id_vip",
":",
"Identifier",
"of",
"the",
"VIP",
".",
"Integer",
... | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vip.py#L31-L83 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Marca.py | Marca.inserir | def inserir(self, name):
"""Inserts a new Brand and returns its identifier
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'marca': {'id': < id_brand >}}
:raise InvalidParameterE... | python | def inserir(self, name):
"""Inserts a new Brand and returns its identifier
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'marca': {'id': < id_brand >}}
:raise InvalidParameterE... | [
"def",
"inserir",
"(",
"self",
",",
"name",
")",
":",
"brand_map",
"=",
"dict",
"(",
")",
"brand_map",
"[",
"'name'",
"]",
"=",
"name",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'brand'",
":",
"brand_map",
"}",
",",
"'POST'",
",",
... | Inserts a new Brand and returns its identifier
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'marca': {'id': < id_brand >}}
:raise InvalidParameterError: Name is null and invalid.
... | [
"Inserts",
"a",
"new",
"Brand",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L50-L71 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Marca.py | Marca.alterar | def alterar(self, id_brand, name):
"""Change Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: None
:raise InvalidParameterError: ... | python | def alterar(self, id_brand, name):
"""Change Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: None
:raise InvalidParameterError: ... | [
"def",
"alterar",
"(",
"self",
",",
"id_brand",
",",
"name",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_brand",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Brand is invalid or was not informed.'",
")",
"url",
"=",
"'brand/'",
"+"... | Change Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:param name: Brand name. String with a minimum 3 and maximum of 100 characters
:return: None
:raise InvalidParameterError: The identifier of Brand or name is null and in... | [
"Change",
"Brand",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L73-L99 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Marca.py | Marca.remover | def remover(self, id_brand):
"""Remove Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Brand is null and invalid.
:raise MarcaNaoExisteError: Brand not re... | python | def remover(self, id_brand):
"""Remove Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Brand is null and invalid.
:raise MarcaNaoExisteError: Brand not re... | [
"def",
"remover",
"(",
"self",
",",
"id_brand",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_brand",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Brand is invalid or was not informed.'",
")",
"url",
"=",
"'brand/'",
"+",
"str",
"(",... | Remove Brand from by the identifier.
:param id_brand: Identifier of the Brand. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Brand is null and invalid.
:raise MarcaNaoExisteError: Brand not registered.
:raise MarcaError: The... | [
"Remove",
"Brand",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L101-L123 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.acl_remove_draft | def acl_remove_draft(self, id_vlan, type_acl):
"""
Remove Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise InvalidIdVlanExce... | python | def acl_remove_draft(self, id_vlan, type_acl):
"""
Remove Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise InvalidIdVlanExce... | [
"def",
"acl_remove_draft",
"(",
"self",
",",
"id_vlan",
",",
"type_acl",
")",
":",
"parameters",
"=",
"dict",
"(",
"id_vlan",
"=",
"id_vlan",
",",
"type_acl",
"=",
"type_acl",
")",
"uri",
"=",
"'api/vlan/acl/remove/draft/%(id_vlan)s/%(type_acl)s/'",
"%",
"paramete... | Remove Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise InvalidIdVlanException: Invalid id for Vlan.
:raise NetworkAPIException: Fai... | [
"Remove",
"Acl",
"draft",
"by",
"type"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L36-L54 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.acl_save_draft | def acl_save_draft(self, id_vlan, type_acl, content_draft):
"""
Save Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise Invali... | python | def acl_save_draft(self, id_vlan, type_acl, content_draft):
"""
Save Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise Invali... | [
"def",
"acl_save_draft",
"(",
"self",
",",
"id_vlan",
",",
"type_acl",
",",
"content_draft",
")",
":",
"parameters",
"=",
"dict",
"(",
"id_vlan",
"=",
"id_vlan",
",",
"type_acl",
"=",
"type_acl",
")",
"data",
"=",
"dict",
"(",
"content_draft",
"=",
"conten... | Save Acl draft by type
:param id_vlan: Identity of Vlan
:param type_acl: Acl type v4 or v6
:return: None
:raise VlanDoesNotExistException: Vlan Does Not Exist.
:raise InvalidIdVlanException: Invalid id for Vlan.
:raise NetworkAPIException: Faile... | [
"Save",
"Acl",
"draft",
"by",
"type"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L56-L76 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.search | def search(self, **kwargs):
"""
Method to search vlan's based on extends search.
:param search: Dict containing QuerySets to find vlan's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search vlan's based on extends search.
:param search: Dict containing QuerySets to find vlan's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiVlan",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/vlan/'",
",",
"kwargs",
")",
")"
] | Method to search vlan's based on extends search.
:param search: Dict containing QuerySets to find vlan'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 d... | [
"Method",
"to",
"search",
"vlan",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L78-L91 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.delete | def delete(self, ids):
"""
Method to delete vlan's by their ids
:param ids: Identifiers of vlan's
:return: None
"""
url = build_uri_with_ids('api/v3/vlan/%s/', ids)
return super(ApiVlan, self).delete(url) | python | def delete(self, ids):
"""
Method to delete vlan's by their ids
:param ids: Identifiers of vlan's
:return: None
"""
url = build_uri_with_ids('api/v3/vlan/%s/', ids)
return super(ApiVlan, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/vlan/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiVlan",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete vlan's by their ids
:param ids: Identifiers of vlan's
:return: None | [
"Method",
"to",
"delete",
"vlan",
"s",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L108-L117 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.update | def update(self, vlans):
"""
Method to update vlan's
:param vlans: List containing vlan's desired to updated
:return: None
"""
data = {'vlans': vlans}
vlans_ids = [str(vlan.get('id')) for vlan in vlans]
return super(ApiVlan, self).put('api/v3/vlan/%s/' ... | python | def update(self, vlans):
"""
Method to update vlan's
:param vlans: List containing vlan's desired to updated
:return: None
"""
data = {'vlans': vlans}
vlans_ids = [str(vlan.get('id')) for vlan in vlans]
return super(ApiVlan, self).put('api/v3/vlan/%s/' ... | [
"def",
"update",
"(",
"self",
",",
"vlans",
")",
":",
"data",
"=",
"{",
"'vlans'",
":",
"vlans",
"}",
"vlans_ids",
"=",
"[",
"str",
"(",
"vlan",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"vlan",
"in",
"vlans",
"]",
"return",
"super",
"(",
"ApiVla... | Method to update vlan's
:param vlans: List containing vlan's desired to updated
:return: None | [
"Method",
"to",
"update",
"vlan",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L119-L131 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVlan.py | ApiVlan.create | def create(self, vlans):
"""
Method to create vlan's
:param vlans: List containing vlan's desired to be created on database
:return: None
"""
data = {'vlans': vlans}
return super(ApiVlan, self).post('api/v3/vlan/', data) | python | def create(self, vlans):
"""
Method to create vlan's
:param vlans: List containing vlan's desired to be created on database
:return: None
"""
data = {'vlans': vlans}
return super(ApiVlan, self).post('api/v3/vlan/', data) | [
"def",
"create",
"(",
"self",
",",
"vlans",
")",
":",
"data",
"=",
"{",
"'vlans'",
":",
"vlans",
"}",
"return",
"super",
"(",
"ApiVlan",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/vlan/'",
",",
"data",
")"
] | Method to create vlan's
:param vlans: List containing vlan's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"vlan",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L133-L142 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/utils.py | is_valid_int_param | def is_valid_int_param(param):
"""Verifica se o parâmetro é um valor inteiro válido.
:param param: Valor para ser validado.
:return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário.
"""
if param is None:
return False
try:
param = int(param)
if ... | python | def is_valid_int_param(param):
"""Verifica se o parâmetro é um valor inteiro válido.
:param param: Valor para ser validado.
:return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário.
"""
if param is None:
return False
try:
param = int(param)
if ... | [
"def",
"is_valid_int_param",
"(",
"param",
")",
":",
"if",
"param",
"is",
"None",
":",
"return",
"False",
"try",
":",
"param",
"=",
"int",
"(",
"param",
")",
"if",
"param",
"<",
"0",
":",
"return",
"False",
"except",
"(",
"TypeError",
",",
"ValueError"... | Verifica se o parâmetro é um valor inteiro válido.
:param param: Valor para ser validado.
:return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário. | [
"Verifica",
"se",
"o",
"parâmetro",
"é",
"um",
"valor",
"inteiro",
"válido",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L21-L36 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/utils.py | is_valid_ip | def is_valid_ip(address):
"""Verifica se address é um endereço ip válido.
O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9.
:param address: Endereço IP.
:return: True se o parâmetro é um IP válido, ou False, caso contrário.
"""
if address is None... | python | def is_valid_ip(address):
"""Verifica se address é um endereço ip válido.
O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9.
:param address: Endereço IP.
:return: True se o parâmetro é um IP válido, ou False, caso contrário.
"""
if address is None... | [
"def",
"is_valid_ip",
"(",
"address",
")",
":",
"if",
"address",
"is",
"None",
":",
"return",
"False",
"pattern",
"=",
"r'\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)... | Verifica se address é um endereço ip válido.
O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9.
:param address: Endereço IP.
:return: True se o parâmetro é um IP válido, ou False, caso contrário. | [
"Verifica",
"se",
"address",
"é",
"um",
"endereço",
"ip",
"válido",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L39-L51 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/utils.py | is_valid_version_ip | def is_valid_version_ip(param):
"""Checks if the parameter is a valid ip version value.
:param param: Value to be validated.
:return: True if the parameter has a valid ip version value, or False otherwise.
"""
if param is None:
return False
if param == IP_VERSION.IPv4[0] or param == I... | python | def is_valid_version_ip(param):
"""Checks if the parameter is a valid ip version value.
:param param: Value to be validated.
:return: True if the parameter has a valid ip version value, or False otherwise.
"""
if param is None:
return False
if param == IP_VERSION.IPv4[0] or param == I... | [
"def",
"is_valid_version_ip",
"(",
"param",
")",
":",
"if",
"param",
"is",
"None",
":",
"return",
"False",
"if",
"param",
"==",
"IP_VERSION",
".",
"IPv4",
"[",
"0",
"]",
"or",
"param",
"==",
"IP_VERSION",
".",
"IPv6",
"[",
"0",
"]",
":",
"return",
"T... | Checks if the parameter is a valid ip version value.
:param param: Value to be validated.
:return: True if the parameter has a valid ip version value, or False otherwise. | [
"Checks",
"if",
"the",
"parameter",
"is",
"a",
"valid",
"ip",
"version",
"value",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L77-L90 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.option_vip_by_environmentvip | def option_vip_by_environmentvip(self, environment_vip_id):
"""
List Option Vip by Environment Vip
param environment_vip_id: Id of Environment Vip
"""
uri = 'api/v3/option-vip/environment-vip/%s/' % environment_vip_id
return super(ApiVipRequest, self).get(uri) | python | def option_vip_by_environmentvip(self, environment_vip_id):
"""
List Option Vip by Environment Vip
param environment_vip_id: Id of Environment Vip
"""
uri = 'api/v3/option-vip/environment-vip/%s/' % environment_vip_id
return super(ApiVipRequest, self).get(uri) | [
"def",
"option_vip_by_environmentvip",
"(",
"self",
",",
"environment_vip_id",
")",
":",
"uri",
"=",
"'api/v3/option-vip/environment-vip/%s/'",
"%",
"environment_vip_id",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | List Option Vip by Environment Vip
param environment_vip_id: Id of Environment Vip | [
"List",
"Option",
"Vip",
"by",
"Environment",
"Vip"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L51-L60 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.get_vip_request_details | def get_vip_request_details(self, vip_request_id):
"""
Method to get details of vip request
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/details/%s/' % vip_request_id
return super(ApiVipRequest, self).get(uri) | python | def get_vip_request_details(self, vip_request_id):
"""
Method to get details of vip request
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/details/%s/' % vip_request_id
return super(ApiVipRequest, self).get(uri) | [
"def",
"get_vip_request_details",
"(",
"self",
",",
"vip_request_id",
")",
":",
"uri",
"=",
"'api/v3/vip-request/details/%s/'",
"%",
"vip_request_id",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to get details of vip request
param vip_request_id: vip_request id | [
"Method",
"to",
"get",
"details",
"of",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L62-L70 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.get_vip_request | def get_vip_request(self, vip_request_id):
"""
Method to get vip request
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/%s/' % vip_request_id
return super(ApiVipRequest, self).get(uri) | python | def get_vip_request(self, vip_request_id):
"""
Method to get vip request
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/%s/' % vip_request_id
return super(ApiVipRequest, self).get(uri) | [
"def",
"get_vip_request",
"(",
"self",
",",
"vip_request_id",
")",
":",
"uri",
"=",
"'api/v3/vip-request/%s/'",
"%",
"vip_request_id",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to get vip request
param vip_request_id: vip_request id | [
"Method",
"to",
"get",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L83-L91 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.search_vip_request | def search_vip_request(self, search):
"""
Method to list vip request
param search: search
"""
uri = 'api/v3/vip-request/?%s' % urllib.urlencode({'search': search})
return super(ApiVipRequest, self).get(uri) | python | def search_vip_request(self, search):
"""
Method to list vip request
param search: search
"""
uri = 'api/v3/vip-request/?%s' % urllib.urlencode({'search': search})
return super(ApiVipRequest, self).get(uri) | [
"def",
"search_vip_request",
"(",
"self",
",",
"search",
")",
":",
"uri",
"=",
"'api/v3/vip-request/?%s'",
"%",
"urllib",
".",
"urlencode",
"(",
"{",
"'search'",
":",
"search",
"}",
")",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"get"... | Method to list vip request
param search: search | [
"Method",
"to",
"list",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L93-L101 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.save_vip_request | def save_vip_request(self, vip_request):
"""
Method to save vip request
param vip_request: vip_request object
"""
uri = 'api/v3/vip-request/'
data = dict()
data['vips'] = list()
data['vips'].append(vip_request)
return super(ApiVipRequest, self).... | python | def save_vip_request(self, vip_request):
"""
Method to save vip request
param vip_request: vip_request object
"""
uri = 'api/v3/vip-request/'
data = dict()
data['vips'] = list()
data['vips'].append(vip_request)
return super(ApiVipRequest, self).... | [
"def",
"save_vip_request",
"(",
"self",
",",
"vip_request",
")",
":",
"uri",
"=",
"'api/v3/vip-request/'",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'vips'",
"]",
"=",
"list",
"(",
")",
"data",
"[",
"'vips'",
"]",
".",
"append",
"(",
"vip_request",
... | Method to save vip request
param vip_request: vip_request object | [
"Method",
"to",
"save",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L103-L115 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.update_vip_request | def update_vip_request(self, vip_request, vip_request_id):
"""
Method to update vip request
param vip_request: vip_request object
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/%s/' % vip_request_id
data = dict()
data['vips'] = list()... | python | def update_vip_request(self, vip_request, vip_request_id):
"""
Method to update vip request
param vip_request: vip_request object
param vip_request_id: vip_request id
"""
uri = 'api/v3/vip-request/%s/' % vip_request_id
data = dict()
data['vips'] = list()... | [
"def",
"update_vip_request",
"(",
"self",
",",
"vip_request",
",",
"vip_request_id",
")",
":",
"uri",
"=",
"'api/v3/vip-request/%s/'",
"%",
"vip_request_id",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'vips'",
"]",
"=",
"list",
"(",
")",
"data",
"[",
"'v... | Method to update vip request
param vip_request: vip_request object
param vip_request_id: vip_request id | [
"Method",
"to",
"update",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L117-L130 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.delete_vip_request | def delete_vip_request(self, vip_request_ids):
"""
Method to delete vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/%s/' % vip_request_ids
return super(ApiVipRequest, self).delete(uri) | python | def delete_vip_request(self, vip_request_ids):
"""
Method to delete vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/%s/' % vip_request_ids
return super(ApiVipRequest, self).delete(uri) | [
"def",
"delete_vip_request",
"(",
"self",
",",
"vip_request_ids",
")",
":",
"uri",
"=",
"'api/v3/vip-request/%s/'",
"%",
"vip_request_ids",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"delete",
"(",
"uri",
")"
] | Method to delete vip request
param vip_request_ids: vip_request ids | [
"Method",
"to",
"delete",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L132-L140 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.create_vip | def create_vip(self, vip_request_ids):
"""
Method to create vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids
return super(ApiVipRequest, self).post(uri) | python | def create_vip(self, vip_request_ids):
"""
Method to create vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids
return super(ApiVipRequest, self).post(uri) | [
"def",
"create_vip",
"(",
"self",
",",
"vip_request_ids",
")",
":",
"uri",
"=",
"'api/v3/vip-request/deploy/%s/'",
"%",
"vip_request_ids",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"post",
"(",
"uri",
")"
] | Method to create vip request
param vip_request_ids: vip_request ids | [
"Method",
"to",
"create",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L142-L150 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.remove_vip | def remove_vip(self, vip_request_ids):
"""
Method to delete vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids
return super(ApiVipRequest, self).delete(uri) | python | def remove_vip(self, vip_request_ids):
"""
Method to delete vip request
param vip_request_ids: vip_request ids
"""
uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids
return super(ApiVipRequest, self).delete(uri) | [
"def",
"remove_vip",
"(",
"self",
",",
"vip_request_ids",
")",
":",
"uri",
"=",
"'api/v3/vip-request/deploy/%s/'",
"%",
"vip_request_ids",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"delete",
"(",
"uri",
")"
] | Method to delete vip request
param vip_request_ids: vip_request ids | [
"Method",
"to",
"delete",
"vip",
"request"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L167-L175 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.search | def search(self, **kwargs):
"""
Method to search vip's based on extends search.
:param search: Dict containing QuerySets to find vip's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param ... | python | def search(self, **kwargs):
"""
Method to search vip's based on extends search.
:param search: Dict containing QuerySets to find vip's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param ... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/vip-request/'",
",",
"kwargs",
")",
")"
] | Method to search vip's based on extends search.
:param search: Dict containing QuerySets to find vip'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 def... | [
"Method",
"to",
"search",
"vip",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L177-L190 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.delete | def delete(self, ids):
"""
Method to delete vip's by their id's
:param ids: Identifiers of vip's
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/%s/', ids)
return super(ApiVipRequest, self).delete(url) | python | def delete(self, ids):
"""
Method to delete vip's by their id's
:param ids: Identifiers of vip's
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/%s/', ids)
return super(ApiVipRequest, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/vip-request/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete vip's by their id's
:param ids: Identifiers of vip's
:return: None | [
"Method",
"to",
"delete",
"vip",
"s",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L207-L216 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.update | def update(self, vips):
"""
Method to update vip's
:param vips: List containing vip's desired to updated
:return: None
"""
data = {'vips': vips}
vips_ids = [str(vip.get('id')) for vip in vips]
return super(ApiVipRequest, self).put('api/v3/vip-request/%s... | python | def update(self, vips):
"""
Method to update vip's
:param vips: List containing vip's desired to updated
:return: None
"""
data = {'vips': vips}
vips_ids = [str(vip.get('id')) for vip in vips]
return super(ApiVipRequest, self).put('api/v3/vip-request/%s... | [
"def",
"update",
"(",
"self",
",",
"vips",
")",
":",
"data",
"=",
"{",
"'vips'",
":",
"vips",
"}",
"vips_ids",
"=",
"[",
"str",
"(",
"vip",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"vip",
"in",
"vips",
"]",
"return",
"super",
"(",
"ApiVipRequest... | Method to update vip's
:param vips: List containing vip's desired to updated
:return: None | [
"Method",
"to",
"update",
"vip",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L218-L230 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.create | def create(self, vips):
"""
Method to create vip's
:param vips: List containing vip's desired to be created on database
:return: None
"""
data = {'vips': vips}
return super(ApiVipRequest, self).post('api/v3/vip-request/', data) | python | def create(self, vips):
"""
Method to create vip's
:param vips: List containing vip's desired to be created on database
:return: None
"""
data = {'vips': vips}
return super(ApiVipRequest, self).post('api/v3/vip-request/', data) | [
"def",
"create",
"(",
"self",
",",
"vips",
")",
":",
"data",
"=",
"{",
"'vips'",
":",
"vips",
"}",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/vip-request/'",
",",
"data",
")"
] | Method to create vip's
:param vips: List containing vip's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"vip",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L232-L241 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.deploy | def deploy(self, ids):
"""
Method to deploy vip's
:param vips: List containing vip's desired to be deployed on equipment
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/deploy/%s/', ids)
return super(ApiVipRequest, self).post(url) | python | def deploy(self, ids):
"""
Method to deploy vip's
:param vips: List containing vip's desired to be deployed on equipment
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/deploy/%s/', ids)
return super(ApiVipRequest, self).post(url) | [
"def",
"deploy",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/vip-request/deploy/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
".",
"post",
"(",
"url",
")"
] | Method to deploy vip's
:param vips: List containing vip's desired to be deployed on equipment
:return: None | [
"Method",
"to",
"deploy",
"vip",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L243-L252 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVipRequest.py | ApiVipRequest.undeploy | def undeploy(self, ids, clean_up=0):
"""
Method to undeploy vip's
:param vips: List containing vip's desired to be undeployed on equipment
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/deploy/%s/?cleanup=%s', ids, clean_up)
return super(ApiVipRe... | python | def undeploy(self, ids, clean_up=0):
"""
Method to undeploy vip's
:param vips: List containing vip's desired to be undeployed on equipment
:return: None
"""
url = build_uri_with_ids('api/v3/vip-request/deploy/%s/?cleanup=%s', ids, clean_up)
return super(ApiVipRe... | [
"def",
"undeploy",
"(",
"self",
",",
"ids",
",",
"clean_up",
"=",
"0",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/vip-request/deploy/%s/?cleanup=%s'",
",",
"ids",
",",
"clean_up",
")",
"return",
"super",
"(",
"ApiVipRequest",
",",
"self",
")",
... | Method to undeploy vip's
:param vips: List containing vip's desired to be undeployed on equipment
:return: None | [
"Method",
"to",
"undeploy",
"vip",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L254-L263 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.add | def add(self, tipo_opcao, nome_opcao):
"""Inserts a new Option Pool and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:re... | python | def add(self, tipo_opcao, nome_opcao):
"""Inserts a new Option Pool and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:re... | [
"def",
"add",
"(",
"self",
",",
"tipo_opcao",
",",
"nome_opcao",
")",
":",
"#optionpool_map = dict()",
"#optionpool_map['type'] = tipo_opcao",
"#optionpool_map['name'] = nome_opcao",
"url",
"=",
"'api/pools/options/save/'",
"return",
"self",
".",
"post",
"(",
"url",
",",
... | Inserts a new Option Pool and returns its identifier.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
... | [
"Inserts",
"a",
"new",
"Option",
"Pool",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L40-L62 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.modify | def modify(self, id_option_pool, tipo_opcao, nome_opcao):
"""Change Option Pool from by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opca... | python | def modify(self, id_option_pool, tipo_opcao, nome_opcao):
"""Change Option Pool from by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opca... | [
"def",
"modify",
"(",
"self",
",",
"id_option_pool",
",",
"tipo_opcao",
",",
"nome_opcao",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_pool",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option Pool is invalid or was not informed.... | Change Option Pool from by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respec... | [
"Change",
"Option",
"Pool",
"from",
"by",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L65-L91 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.remove | def remove(self, id_option_pool):
"""Remove Option pool by identifier and all Environment related .
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option Pool identifier is null and invalid.
... | python | def remove(self, id_option_pool):
"""Remove Option pool by identifier and all Environment related .
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option Pool identifier is null and invalid.
... | [
"def",
"remove",
"(",
"self",
",",
"id_option_pool",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_pool",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option Pool is invalid or was not informed.'",
")",
"url",
"=",
"'api/pools/optio... | Remove Option pool by identifier and all Environment related .
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Option Pool identifier is null and invalid.
:raise optionpoolNotFoundError: Option Po... | [
"Remove",
"Option",
"pool",
"by",
"identifier",
"and",
"all",
"Environment",
"related",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L93-L113 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.get_option_pool | def get_option_pool(self, id_option_pool):
"""Search Option Pool by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: Following dictionary:
::
{‘id’: < id_option_pool >,
‘type’: < tipo_opcao >,
... | python | def get_option_pool(self, id_option_pool):
"""Search Option Pool by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: Following dictionary:
::
{‘id’: < id_option_pool >,
‘type’: < tipo_opcao >,
... | [
"def",
"get_option_pool",
"(",
"self",
",",
"id_option_pool",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_pool",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option Pool is invalid or was not informed.'",
")",
"url",
"=",
"'api/po... | Search Option Pool by id.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:return: Following dictionary:
::
{‘id’: < id_option_pool >,
‘type’: < tipo_opcao >,
‘name’: < nome_opcao_txt >}
:raise InvalidPar... | [
"Search",
"Option",
"Pool",
"by",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L115-L140 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.get_all_option_pool | def get_all_option_pool(self, option_type=None):
"""Get all Option Pool.
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
‘type’: < tipo_opcao >,
‘name’: < nome_opcao_txt >}, ... other option pool ...] }
:raise optionpoolNotFou... | python | def get_all_option_pool(self, option_type=None):
"""Get all Option Pool.
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
‘type’: < tipo_opcao >,
‘name’: < nome_opcao_txt >}, ... other option pool ...] }
:raise optionpoolNotFou... | [
"def",
"get_all_option_pool",
"(",
"self",
",",
"option_type",
"=",
"None",
")",
":",
"if",
"option_type",
":",
"url",
"=",
"'api/pools/options/?type='",
"+",
"option_type",
"else",
":",
"url",
"=",
"'api/pools/options/'",
"return",
"self",
".",
"get",
"(",
"u... | Get all Option Pool.
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
‘type’: < tipo_opcao >,
‘name’: < nome_opcao_txt >}, ... other option pool ...] }
:raise optionpoolNotFoundError: Option Pool not registered.
:raise DataBase... | [
"Get",
"all",
"Option",
"Pool",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L142-L163 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.get_all_environment_option_pool | def get_all_environment_option_pool(self, id_environment=None, option_id=None, option_type=None):
"""Get all Option VIP by Environment .
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
option: {
'id': <id>
... | python | def get_all_environment_option_pool(self, id_environment=None, option_id=None, option_type=None):
"""Get all Option VIP by Environment .
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
option: {
'id': <id>
... | [
"def",
"get_all_environment_option_pool",
"(",
"self",
",",
"id_environment",
"=",
"None",
",",
"option_id",
"=",
"None",
",",
"option_type",
"=",
"None",
")",
":",
"url",
"=",
"'api/pools/environment_options/'",
"if",
"id_environment",
":",
"if",
"option_id",
":"... | Get all Option VIP by Environment .
:return: Dictionary with the following structure:
::
{[{‘id’: < id >,
option: {
'id': <id>
'type':<type>
'name':<name> }
environment: {
'id':... | [
"Get",
"all",
"Option",
"VIP",
"by",
"Environment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L165-L208 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.associate_environment_option_pool | def associate_environment_option_pool(self, id_option_pool, id_environment):
"""Create a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment . Integer value a... | python | def associate_environment_option_pool(self, id_option_pool, id_environment):
"""Create a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment . Integer value a... | [
"def",
"associate_environment_option_pool",
"(",
"self",
",",
"id_option_pool",
",",
"id_environment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_option_pool",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option Pool is invalid or was not i... | Create a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment . Integer value and greater than zero.
:return: Dictionary with the following structure:
... | [
"Create",
"a",
"relationship",
"of",
"optionpool",
"with",
"Environment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L211-L250 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.disassociate_environment_option_pool | def disassociate_environment_option_pool(self, environment_option_id):
"""Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment Pool. Integer value and... | python | def disassociate_environment_option_pool(self, environment_option_id):
"""Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment Pool. Integer value and... | [
"def",
"disassociate_environment_option_pool",
"(",
"self",
",",
"environment_option_id",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"environment_option_id",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Option Pool is invalid or was not informed.'"... | Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment Pool. Integer value and greater than zero.
:return: { 'id': < environment_option_id> }
... | [
"Remove",
"a",
"relationship",
"of",
"optionpool",
"with",
"Environment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L279-L306 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/OptionPool.py | OptionPool.modify_environment_option_pool | def modify_environment_option_pool(self, environment_option_id, id_option_pool,id_environment ):
"""Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environme... | python | def modify_environment_option_pool(self, environment_option_id, id_option_pool,id_environment ):
"""Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environme... | [
"def",
"modify_environment_option_pool",
"(",
"self",
",",
"environment_option_id",
",",
"id_option_pool",
",",
"id_environment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"environment_option_id",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier ... | Remove a relationship of optionpool with Environment.
:param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero.
:param id_environment: Identifier of the Environment Pool. Integer value and greater than zero.
:return: Dictionary with the following struct... | [
"Remove",
"a",
"relationship",
"of",
"optionpool",
"with",
"Environment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L309-L349 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.add | def add(self, name, description):
"""Inserts a new Filter and returns its identifier.
:param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-]
:param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-]
:return: Following d... | python | def add(self, name, description):
"""Inserts a new Filter and returns its identifier.
:param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-]
:param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-]
:return: Following d... | [
"def",
"add",
"(",
"self",
",",
"name",
",",
"description",
")",
":",
"filter_map",
"=",
"dict",
"(",
")",
"filter_map",
"[",
"'name'",
"]",
"=",
"name",
"filter_map",
"[",
"'description'",
"]",
"=",
"description",
"code",
",",
"xml",
"=",
"self",
".",... | Inserts a new Filter and returns its identifier.
:param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-]
:param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-]
:return: Following dictionary:
::
{'filter'... | [
"Inserts",
"a",
"new",
"Filter",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L59-L82 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.alter | def alter(self, id_filter, name, description):
"""Change Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param description: Description. String w... | python | def alter(self, id_filter, name, description):
"""Change Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param description: Description. String w... | [
"def",
"alter",
"(",
"self",
",",
"id_filter",
",",
"name",
",",
"description",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_filter",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Filter is invalid or was not informed.'",
")",
"filter_... | Change Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-]
:param description: Description. String with a maximum of 50 characters and respect [a-zA-Z\_-]
... | [
"Change",
"Filter",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L84-L112 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.remove | def remove(self, id_filter):
"""Remove Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Filter identifier is null and invalid.
:raise FilterNotFoundError: Filter not registere... | python | def remove(self, id_filter):
"""Remove Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Filter identifier is null and invalid.
:raise FilterNotFoundError: Filter not registere... | [
"def",
"remove",
"(",
"self",
",",
"id_filter",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_filter",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Filter is invalid or was not informed.'",
")",
"url",
"=",
"'filter/'",
"+",
"str",
"... | Remove Filter by the identifier.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: Filter identifier is null and invalid.
:raise FilterNotFoundError: Filter not registered.
:raise DataBaseError: Network... | [
"Remove",
"Filter",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L114-L135 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.get | def get(self, id_filter):
"""Get filter by id.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: Following dictionary:
::
{‘filter’: {‘id’: < id >,
‘name’: < name >,
‘description’: < description >}}
... | python | def get(self, id_filter):
"""Get filter by id.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: Following dictionary:
::
{‘filter’: {‘id’: < id >,
‘name’: < name >,
‘description’: < description >}}
... | [
"def",
"get",
"(",
"self",
",",
"id_filter",
")",
":",
"url",
"=",
"'filter/get/'",
"+",
"str",
"(",
"id_filter",
")",
"+",
"'/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
... | Get filter by id.
:param id_filter: Identifier of the Filter. Integer value and greater than zero.
:return: Following dictionary:
::
{‘filter’: {‘id’: < id >,
‘name’: < name >,
‘description’: < description >}}
:raise InvalidParameterError: The val... | [
"Get",
"filter",
"by",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L137-L159 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.associate | def associate(self, et_id, id_filter):
"""Create a relationship between Filter and TipoEquipamento.
:param et_id: Identifier of TipoEquipamento. Integer value and greater than zero.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:return: Following dictiona... | python | def associate(self, et_id, id_filter):
"""Create a relationship between Filter and TipoEquipamento.
:param et_id: Identifier of TipoEquipamento. Integer value and greater than zero.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:return: Following dictiona... | [
"def",
"associate",
"(",
"self",
",",
"et_id",
",",
"id_filter",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"et_id",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of TipoEquipamento is invalid or was not informed.'",
")",
"if",
"not",
"is_v... | Create a relationship between Filter and TipoEquipamento.
:param et_id: Identifier of TipoEquipamento. Integer value and greater than zero.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:return: Following dictionary:
::
{'equiptype_filter_xr... | [
"Create",
"a",
"relationship",
"between",
"Filter",
"and",
"TipoEquipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L161-L193 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Filter.py | Filter.dissociate | def dissociate(self, id_filter, id_eq_type):
"""Removes relationship between Filter and TipoEquipamento.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero.
:return: None
... | python | def dissociate(self, id_filter, id_eq_type):
"""Removes relationship between Filter and TipoEquipamento.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero.
:return: None
... | [
"def",
"dissociate",
"(",
"self",
",",
"id_filter",
",",
"id_eq_type",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_filter",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Filter is invalid or was not informed.'",
")",
"if",
"not",
"is_... | Removes relationship between Filter and TipoEquipamento.
:param id_filter: Identifier of Filter. Integer value and greater than zero.
:param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero.
:return: None
:raise FilterNotFoundError: Filter not registered.
... | [
"Removes",
"relationship",
"between",
"Filter",
"and",
"TipoEquipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L195-L222 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.search | def search(self, id_egroup):
"""Search Group Equipament from by the identifier.
:param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero.
:return: Following dictionary:
::
{‘group_equipament’: {‘id’: < id_egrupo >,
‘nome’: < n... | python | def search(self, id_egroup):
"""Search Group Equipament from by the identifier.
:param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero.
:return: Following dictionary:
::
{‘group_equipament’: {‘id’: < id_egrupo >,
‘nome’: < n... | [
"def",
"search",
"(",
"self",
",",
"id_egroup",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_egroup",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group Equipament is invalid or was not informed.'",
")",
"url",
"=",
"'egroup/'",
"+",
... | Search Group Equipament from by the identifier.
:param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero.
:return: Following dictionary:
::
{‘group_equipament’: {‘id’: < id_egrupo >,
‘nome’: < nome >} }
:raise InvalidParamete... | [
"Search",
"Group",
"Equipament",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L38-L64 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.inserir | def inserir(self, nome):
"""Insere um novo grupo de equipamento e retorna o seu identificador.
:param nome: Nome do grupo de equipamento.
:return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}}
:raise InvalidParameterError: Nome do grupo é nulo ou vazio.
:raise... | python | def inserir(self, nome):
"""Insere um novo grupo de equipamento e retorna o seu identificador.
:param nome: Nome do grupo de equipamento.
:return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}}
:raise InvalidParameterError: Nome do grupo é nulo ou vazio.
:raise... | [
"def",
"inserir",
"(",
"self",
",",
"nome",
")",
":",
"egrupo_map",
"=",
"dict",
"(",
")",
"egrupo_map",
"[",
"'nome'",
"]",
"=",
"nome",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'grupo'",
":",
"egrupo_map",
"}",
",",
"'POST'",
",... | Insere um novo grupo de equipamento e retorna o seu identificador.
:param nome: Nome do grupo de equipamento.
:return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}}
:raise InvalidParameterError: Nome do grupo é nulo ou vazio.
:raise NomeGrupoEquipamentoDuplicadoError:... | [
"Insere",
"um",
"novo",
"grupo",
"de",
"equipamento",
"e",
"retorna",
"o",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L111-L128 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.alterar | def alterar(self, id_egrupo, nome):
"""Altera os dados de um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param nome: Nome do grupo de equipamento.
:return: None
:raise InvalidParameterError: O identificador e/ou... | python | def alterar(self, id_egrupo, nome):
"""Altera os dados de um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param nome: Nome do grupo de equipamento.
:return: None
:raise InvalidParameterError: O identificador e/ou... | [
"def",
"alterar",
"(",
"self",
",",
"id_egrupo",
",",
"nome",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_egrupo",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do grupo de equipamento é inválido ou não foi informado.')",
"",
"url",
"=",
... | Altera os dados de um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param nome: Nome do grupo de equipamento.
:return: None
:raise InvalidParameterError: O identificador e/ou o nome do grupo são nulos ou inválidos.
... | [
"Altera",
"os",
"dados",
"de",
"um",
"grupo",
"de",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L130-L155 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.remover | def remover(self, id_egrupo):
"""Remove um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:return: None
:raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado.
:raise InvalidParameterError: O ide... | python | def remover(self, id_egrupo):
"""Remove um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:return: None
:raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado.
:raise InvalidParameterError: O ide... | [
"def",
"remover",
"(",
"self",
",",
"id_egrupo",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_egrupo",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do grupo de equipamento é inválido ou não foi informado.')",
"",
"url",
"=",
"'egrupo/'",
... | Remove um grupo de equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:return: None
:raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado.
:raise InvalidParameterError: O identificador do grupo é nulo ou inválido.
... | [
"Remove",
"um",
"grupo",
"de",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L157-L178 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.associa_equipamento | def associa_equipamento(self, id_equip, id_grupo_equipamento):
"""Associa um equipamento a um grupo.
:param id_equip: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equipament... | python | def associa_equipamento(self, id_equip, id_grupo_equipamento):
"""Associa um equipamento a um grupo.
:param id_equip: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equipament... | [
"def",
"associa_equipamento",
"(",
"self",
",",
"id_equip",
",",
"id_grupo_equipamento",
")",
":",
"equip_map",
"=",
"dict",
"(",
")",
"equip_map",
"[",
"'id_grupo'",
"]",
"=",
"id_grupo_equipamento",
"equip_map",
"[",
"'id_equipamento'",
"]",
"=",
"id_equip",
"... | Associa um equipamento a um grupo.
:param id_equip: Identificador do equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:return: Dicionário com a seguinte estrutura:
{'equipamento_grupo':{'id': < id_equip_do_grupo >}}
:raise GrupoEquipamentoNa... | [
"Associa",
"um",
"equipamento",
"a",
"um",
"grupo",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L180-L204 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoEquipamento.py | GrupoEquipamento.remove | def remove(self, id_equipamento, id_egrupo):
"""Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:return: None
:raise E... | python | def remove(self, id_equipamento, id_egrupo):
"""Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:return: None
:raise E... | [
"def",
"remove",
"(",
"self",
",",
"id_equipamento",
",",
"id_egrupo",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_egrupo",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do grupo de equipamento é inválido ou não foi informado.')",
"",
"if",... | Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador.
:param id_egrupo: Identificador do grupo de equipamento.
:param id_equipamento: Identificador do equipamento.
:return: None
:raise EquipamentoNaoExisteError: Equipamento não cadastrado.
... | [
"Remove",
"a",
"associacao",
"de",
"um",
"grupo",
"de",
"equipamento",
"com",
"um",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L206-L234 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/AmbienteLogico.py | AmbienteLogico.inserir | def inserir(self, name):
"""Inserts a new Logical Environment and returns its identifier.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'logical_environment': {'id': < id_l... | python | def inserir(self, name):
"""Inserts a new Logical Environment and returns its identifier.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'logical_environment': {'id': < id_l... | [
"def",
"inserir",
"(",
"self",
",",
"name",
")",
":",
"logical_environment_map",
"=",
"dict",
"(",
")",
"logical_environment_map",
"[",
"'name'",
"]",
"=",
"name",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'logical_environment'",
":",
"log... | Inserts a new Logical Environment and returns its identifier.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'logical_environment': {'id': < id_logical_environment >}}
:rai... | [
"Inserts",
"a",
"new",
"Logical",
"Environment",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L58-L81 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/AmbienteLogico.py | AmbienteLogico.alterar | def alterar(self, id_logicalenvironment, name):
"""Change Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 charac... | python | def alterar(self, id_logicalenvironment, name):
"""Change Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 charac... | [
"def",
"alterar",
"(",
"self",
",",
"id_logicalenvironment",
",",
"name",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_logicalenvironment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Logical Environment is invalid or was not informed.'",
... | Change Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters
:return: None
:raise InvalidParamete... | [
"Change",
"Logical",
"Environment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L83-L110 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/AmbienteLogico.py | AmbienteLogico.remover | def remover(self, id_logicalenvironment):
"""Remove Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Logical Environment i... | python | def remover(self, id_logicalenvironment):
"""Remove Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Logical Environment i... | [
"def",
"remover",
"(",
"self",
",",
"id_logicalenvironment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_logicalenvironment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Logical Environment is invalid or was not informed.'",
")",
"url",
"... | Remove Logical Environment from by the identifier.
:param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Logical Environment is null and invalid.
:raise AmbienteLogicoNaoE... | [
"Remove",
"Logical",
"Environment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L112-L133 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/exception.py | ErrorHandler.handle | def handle(cls, code, description):
'''Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente.
:param code: Código de erro retornado pela networkAPI.
:param description: Descrição do erro.
:return: None
'''
if code is None:
rais... | python | def handle(cls, code, description):
'''Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente.
:param code: Código de erro retornado pela networkAPI.
:param description: Descrição do erro.
:return: None
'''
if code is None:
rais... | [
"def",
"handle",
"(",
"cls",
",",
"code",
",",
"description",
")",
":",
"if",
"code",
"is",
"None",
":",
"raise",
"NetworkAPIClientError",
"(",
"description",
")",
"if",
"int",
"(",
"code",
")",
"in",
"cls",
".",
"errors",
":",
"raise",
"cls",
".",
"... | Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente.
:param code: Código de erro retornado pela networkAPI.
:param description: Descrição do erro.
:return: None | [
"Recebe",
"o",
"código",
"e",
"a",
"descrição",
"do",
"erro",
"da",
"networkAPI",
"e",
"lança",
"a",
"exceção",
"correspondente",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/exception.py#L1109-L1123 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/PermissaoAdministrativa.py | PermissaoAdministrativa.list_by_group | def list_by_group(self, id_ugroup):
"""Search Administrative Permission by Group User by identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'perms': [{'ugrupo': < ugrupo_id... | python | def list_by_group(self, id_ugroup):
"""Search Administrative Permission by Group User by identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'perms': [{'ugrupo': < ugrupo_id... | [
"def",
"list_by_group",
"(",
"self",
",",
"id_ugroup",
")",
":",
"if",
"id_ugroup",
"is",
"None",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group User is invalid or was not informed.'",
")",
"url",
"=",
"'aperms/group/'",
"+",
"str",
"(",
"id_ug... | Search Administrative Permission by Group User by identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{'perms': [{'ugrupo': < ugrupo_id >, 'permission': { 'function' < function >, '... | [
"Search",
"Administrative",
"Permission",
"by",
"Group",
"User",
"by",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L38-L65 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/PermissaoAdministrativa.py | PermissaoAdministrativa.search | def search(self, id_perm):
"""Search Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: Following dictionary:
::
{'perm': {'ugrupo': < ugrupo_id >,
'permi... | python | def search(self, id_perm):
"""Search Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: Following dictionary:
::
{'perm': {'ugrupo': < ugrupo_id >,
'permi... | [
"def",
"search",
"(",
"self",
",",
"id_perm",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_perm",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Administrative Permission is invalid or was not informed.'",
")",
"url",
"=",
"'aperms/get/'",
... | Search Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: Following dictionary:
::
{'perm': {'ugrupo': < ugrupo_id >,
'permission': < permission_id >, 'id': < id ... | [
"Search",
"Administrative",
"Permission",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L67-L94 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/PermissaoAdministrativa.py | PermissaoAdministrativa.inserir | def inserir(self, id_permission, read, write, id_group):
"""Inserts a new Administrative Permission and returns its identifier.
:param id_permission: Identifier of the Permission. Integer value and greater than zero.
:param read: Read. 0 or 1
:param write: Write. 0 or 1
:param i... | python | def inserir(self, id_permission, read, write, id_group):
"""Inserts a new Administrative Permission and returns its identifier.
:param id_permission: Identifier of the Permission. Integer value and greater than zero.
:param read: Read. 0 or 1
:param write: Write. 0 or 1
:param i... | [
"def",
"inserir",
"(",
"self",
",",
"id_permission",
",",
"read",
",",
"write",
",",
"id_group",
")",
":",
"perms_map",
"=",
"dict",
"(",
")",
"perms_map",
"[",
"'id_permission'",
"]",
"=",
"id_permission",
"perms_map",
"[",
"'read'",
"]",
"=",
"read",
"... | Inserts a new Administrative Permission and returns its identifier.
:param id_permission: Identifier of the Permission. Integer value and greater than zero.
:param read: Read. 0 or 1
:param write: Write. 0 or 1
:param id_group: Identifier of the Group of User. Integer value and greater ... | [
"Inserts",
"a",
"new",
"Administrative",
"Permission",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L117-L147 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/PermissaoAdministrativa.py | PermissaoAdministrativa.alterar | def alterar(self, id_perm, id_permission, read, write, id_group):
"""Change Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:param id_permission: Identifier of the Permission. Integer value and g... | python | def alterar(self, id_perm, id_permission, read, write, id_group):
"""Change Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:param id_permission: Identifier of the Permission. Integer value and g... | [
"def",
"alterar",
"(",
"self",
",",
"id_perm",
",",
"id_permission",
",",
"read",
",",
"write",
",",
"id_group",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_perm",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Administrative Permi... | Change Administrative Permission from by the identifier.
:param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero.
:param id_permission: Identifier of the Permission. Integer value and greater than zero.
:param read: Read. 0 or 1
:param write: Wri... | [
"Change",
"Administrative",
"Permission",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L149-L183 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/PermissaoAdministrativa.py | PermissaoAdministrativa.remover | def remover(self, id_perms):
"""Remove Administrative Permission from by the identifier.
:param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Administrative Permission is null a... | python | def remover(self, id_perms):
"""Remove Administrative Permission from by the identifier.
:param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Administrative Permission is null a... | [
"def",
"remover",
"(",
"self",
",",
"id_perms",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_perms",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Administrative Permission is invalid or was not informed.'",
")",
"url",
"=",
"'aperms/'",
... | Remove Administrative Permission from by the identifier.
:param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Administrative Permission is null and invalid.
:raise PermissaoAdmi... | [
"Remove",
"Administrative",
"Permission",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L185-L205 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_ambiente | def create_ambiente(self):
"""Get an instance of ambiente services facade."""
return Ambiente(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_ambiente(self):
"""Get an instance of ambiente services facade."""
return Ambiente(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_ambiente",
"(",
"self",
")",
":",
"return",
"Ambiente",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of ambiente services facade. | [
"Get",
"an",
"instance",
"of",
"ambiente",
"services",
"facade",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L100-L106 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_ambiente_logico | def create_ambiente_logico(self):
"""Get an instance of ambiente_logico services facade."""
return AmbienteLogico(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_ambiente_logico(self):
"""Get an instance of ambiente_logico services facade."""
return AmbienteLogico(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_ambiente_logico",
"(",
"self",
")",
":",
"return",
"AmbienteLogico",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of ambiente_logico services facade. | [
"Get",
"an",
"instance",
"of",
"ambiente_logico",
"services",
"facade",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L108-L114 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ClientFactory.py | ClientFactory.create_api_environment_vip | def create_api_environment_vip(self):
"""Get an instance of Api Environment Vip services facade."""
return ApiEnvironmentVip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | python | def create_api_environment_vip(self):
"""Get an instance of Api Environment Vip services facade."""
return ApiEnvironmentVip(
self.networkapi_url,
self.user,
self.password,
self.user_ldap) | [
"def",
"create_api_environment_vip",
"(",
"self",
")",
":",
"return",
"ApiEnvironmentVip",
"(",
"self",
".",
"networkapi_url",
",",
"self",
".",
"user",
",",
"self",
".",
"password",
",",
"self",
".",
"user_ldap",
")"
] | Get an instance of Api Environment Vip services facade. | [
"Get",
"an",
"instance",
"of",
"Api",
"Environment",
"Vip",
"services",
"facade",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L116-L122 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L124-L130 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L132-L138 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L140-L146 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L148-L154 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L156-L162 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L164-L170 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L172-L179 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L181-L188 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L190-L197 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L199-L206 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L208-L215 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L217-L224 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L226-L233 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L235-L241 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L243-L249 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L251-L257 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L259-L265 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L267-L275 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L277-L284 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L286-L293 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L295-L302 | train |
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",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L304-L310 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.