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/EquipamentoAcesso.py | EquipamentoAcesso.edit_by_id | def edit_by_id(
self,
id_equip_acesso,
id_tipo_acesso,
fqdn,
user,
password,
enable_pass):
"""Edit access type, fqdn, user, password and enable_pass of the relationship of
equipment and access type.
:param id_ti... | python | def edit_by_id(
self,
id_equip_acesso,
id_tipo_acesso,
fqdn,
user,
password,
enable_pass):
"""Edit access type, fqdn, user, password and enable_pass of the relationship of
equipment and access type.
:param id_ti... | [
"def",
"edit_by_id",
"(",
"self",
",",
"id_equip_acesso",
",",
"id_tipo_acesso",
",",
"fqdn",
",",
"user",
",",
"password",
",",
"enable_pass",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_tipo_acesso",
")",
":",
"raise",
"InvalidParameterError",
"(",
... | Edit access type, fqdn, user, password and enable_pass of the relationship of
equipment and access type.
:param id_tipo_acesso: Access type identifier.
:param id_equip_acesso: Equipment identifier.
:param fqdn: Equipment FQDN.
:param user: User.
:param password: Password... | [
"Edit",
"access",
"type",
"fqdn",
"user",
"password",
"and",
"enable_pass",
"of",
"the",
"relationship",
"of",
"equipment",
"and",
"access",
"type",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L162-L206 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EquipamentoAcesso.py | EquipamentoAcesso.remover | def remover(self, id_tipo_acesso, id_equipamento):
"""Removes relationship between equipment and access type.
:param id_equipamento: Equipment identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise EquipamentoNaoExisteError: Equipment doesn't exist.
... | python | def remover(self, id_tipo_acesso, id_equipamento):
"""Removes relationship between equipment and access type.
:param id_equipamento: Equipment identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise EquipamentoNaoExisteError: Equipment doesn't exist.
... | [
"def",
"remover",
"(",
"self",
",",
"id_tipo_acesso",
",",
"id_equipamento",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_tipo_acesso",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Access type id is invalid.'",
")",
"if",
"not",
"is_valid_int_param",
... | Removes relationship between equipment and access type.
:param id_equipamento: Equipment identifier.
:param id_tipo_acesso: Access type identifier.
:return: None
:raise EquipamentoNaoExisteError: Equipment doesn't exist.
:raise EquipamentoAcessoNaoExisteError: Relationship bet... | [
"Removes",
"relationship",
"between",
"equipment",
"and",
"access",
"type",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L208-L234 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.set_poolmember_state | def set_poolmember_state(self, id_pools, pools):
"""
Enable/Disable pool member by list
"""
data = dict()
uri = "api/v3/pool/real/%s/member/status/" % ';'.join(id_pools)
data["server_pools"] = pools
return self.put(uri, data=data) | python | def set_poolmember_state(self, id_pools, pools):
"""
Enable/Disable pool member by list
"""
data = dict()
uri = "api/v3/pool/real/%s/member/status/" % ';'.join(id_pools)
data["server_pools"] = pools
return self.put(uri, data=data) | [
"def",
"set_poolmember_state",
"(",
"self",
",",
"id_pools",
",",
"pools",
")",
":",
"data",
"=",
"dict",
"(",
")",
"uri",
"=",
"\"api/v3/pool/real/%s/member/status/\"",
"%",
"';'",
".",
"join",
"(",
"id_pools",
")",
"data",
"[",
"\"server_pools\"",
"]",
"="... | Enable/Disable pool member by list | [
"Enable",
"/",
"Disable",
"pool",
"member",
"by",
"list"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L37-L48 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.get_poolmember_state | def get_poolmember_state(self, id_pools, checkstatus=0):
"""
Enable/Disable pool member by list
"""
uri = "api/v3/pool/real/%s/member/status/?checkstatus=%s" % (';'.join(id_pools), checkstatus)
return self.get(uri) | python | def get_poolmember_state(self, id_pools, checkstatus=0):
"""
Enable/Disable pool member by list
"""
uri = "api/v3/pool/real/%s/member/status/?checkstatus=%s" % (';'.join(id_pools), checkstatus)
return self.get(uri) | [
"def",
"get_poolmember_state",
"(",
"self",
",",
"id_pools",
",",
"checkstatus",
"=",
"0",
")",
":",
"uri",
"=",
"\"api/v3/pool/real/%s/member/status/?checkstatus=%s\"",
"%",
"(",
"';'",
".",
"join",
"(",
"id_pools",
")",
",",
"checkstatus",
")",
"return",
"self... | Enable/Disable pool member by list | [
"Enable",
"/",
"Disable",
"pool",
"member",
"by",
"list"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L50-L57 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.list_all | def list_all(self, environment_id, pagination):
"""
List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pools"... | python | def list_all(self, environment_id, pagination):
"""
List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pools"... | [
"def",
"list_all",
"(",
"self",
",",
"environment_id",
",",
"pagination",
")",
":",
"uri",
"=",
"\"api/pools/\"",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"start_record\"",
"]",
"=",
"pagination",
".",
"start_record",
"data",
"[",
"\"end_record\"",
"]",... | List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pools" :[{
"id": < id >
... | [
"List",
"All",
"Pools",
"To",
"Populate",
"Datatable"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L59-L88 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.list_all_by_reqvip | def list_all_by_reqvip(self, id_vip, pagination):
"""
List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pool... | python | def list_all_by_reqvip(self, id_vip, pagination):
"""
List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pool... | [
"def",
"list_all_by_reqvip",
"(",
"self",
",",
"id_vip",
",",
"pagination",
")",
":",
"uri",
"=",
"\"api/pools/pool_list_by_reqvip/\"",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"start_record\"",
"]",
"=",
"pagination",
".",
"start_record",
"data",
"[",
"\... | List All Pools To Populate Datatable
:param pagination: Object Pagination
:return: Following dictionary:{
"total" : < total >,
"pools" :[{
"id": < id >
... | [
"List",
"All",
"Pools",
"To",
"Populate",
"Datatable"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L90-L119 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.remove | def remove(self, pools):
"""
Remove Pools Running Script And Update to Not Created
:param ids: List of ids
:return: None on success
:raise ScriptRemovePoolException
:raise InvalidIdPoolException
:raise NetworkAPIException
"""
... | python | def remove(self, pools):
"""
Remove Pools Running Script And Update to Not Created
:param ids: List of ids
:return: None on success
:raise ScriptRemovePoolException
:raise InvalidIdPoolException
:raise NetworkAPIException
"""
... | [
"def",
"remove",
"(",
"self",
",",
"pools",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"pools\"",
"]",
"=",
"pools",
"uri",
"=",
"\"api/pools/v2/\"",
"return",
"self",
".",
"delete",
"(",
"uri",
",",
"data",
")"
] | Remove Pools Running Script And Update to Not Created
:param ids: List of ids
:return: None on success
:raise ScriptRemovePoolException
:raise InvalidIdPoolException
:raise NetworkAPIException | [
"Remove",
"Pools",
"Running",
"Script",
"And",
"Update",
"to",
"Not",
"Created"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L322-L340 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.create | def create(self, pools):
"""
Create Pools Running Script And Update to Created
:param pools: List of pools
:return: None on success
:raise PoolDoesNotExistException
:raise ScriptCreatePoolException
:raise InvalidIdPoolException
... | python | def create(self, pools):
"""
Create Pools Running Script And Update to Created
:param pools: List of pools
:return: None on success
:raise PoolDoesNotExistException
:raise ScriptCreatePoolException
:raise InvalidIdPoolException
... | [
"def",
"create",
"(",
"self",
",",
"pools",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"pools\"",
"]",
"=",
"pools",
"uri",
"=",
"\"api/pools/v2/\"",
"return",
"self",
".",
"put",
"(",
"uri",
",",
"data",
")"
] | Create Pools Running Script And Update to Created
:param pools: List of pools
:return: None on success
:raise PoolDoesNotExistException
:raise ScriptCreatePoolException
:raise InvalidIdPoolException
:raise NetworkAPIException | [
"Create",
"Pools",
"Running",
"Script",
"And",
"Update",
"to",
"Created"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L342-L361 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.enable | def enable(self, ids):
"""
Enable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptEnablePoolException
:raise... | python | def enable(self, ids):
"""
Enable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptEnablePoolException
:raise... | [
"def",
"enable",
"(",
"self",
",",
"ids",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"ids\"",
"]",
"=",
"ids",
"uri",
"=",
"\"api/pools/enable/\"",
"return",
"self",
".",
"post",
"(",
"uri",
",",
"data",
")"
] | Enable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptEnablePoolException
:raise NetworkAPIException | [
"Enable",
"Pool",
"Members",
"Running",
"Script"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L363-L382 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Pool.py | Pool.disable | def disable(self, ids):
"""
Disable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptDisablePoolException
:ra... | python | def disable(self, ids):
"""
Disable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptDisablePoolException
:ra... | [
"def",
"disable",
"(",
"self",
",",
"ids",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"\"ids\"",
"]",
"=",
"ids",
"uri",
"=",
"\"api/pools/disable/\"",
"return",
"self",
".",
"post",
"(",
"uri",
",",
"data",
")"
] | Disable Pool Members Running Script
:param ids: List of ids
:return: None on success
:raise PoolMemberDoesNotExistException
:raise InvalidIdPoolMemberException
:raise ScriptDisablePoolException
:raise NetworkAPIException | [
"Disable",
"Pool",
"Members",
"Running",
"Script"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L384-L403 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.listar_por_grupo_usuario | def listar_por_grupo_usuario(self, id_grupo_usuario):
"""Lista todos os direitos de um grupo de usuário em grupos de equipamento.
:param id_grupo_usuario: Identificador do grupo de usuário para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
{'direito... | python | def listar_por_grupo_usuario(self, id_grupo_usuario):
"""Lista todos os direitos de um grupo de usuário em grupos de equipamento.
:param id_grupo_usuario: Identificador do grupo de usuário para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
{'direito... | [
"def",
"listar_por_grupo_usuario",
"(",
"self",
",",
"id_grupo_usuario",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_grupo_usuario",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do grupo de usuário é inválido ou não foi informado.')",
"",
"url... | Lista todos os direitos de um grupo de usuário em grupos de equipamento.
:param id_grupo_usuario: Identificador do grupo de usuário para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
{'direito_grupo_equipamento':
[{'id_grupo_equipamento': < id_g... | [
"Lista",
"todos",
"os",
"direitos",
"de",
"um",
"grupo",
"de",
"usuário",
"em",
"grupos",
"de",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L64-L97 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.listar_por_grupo_equipamento | def listar_por_grupo_equipamento(self, id_grupo_equipamento):
"""Lista todos os direitos de grupos de usuário em um grupo de equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
... | python | def listar_por_grupo_equipamento(self, id_grupo_equipamento):
"""Lista todos os direitos de grupos de usuário em um grupo de equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
... | [
"def",
"listar_por_grupo_equipamento",
"(",
"self",
",",
"id_grupo_equipamento",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_grupo_equipamento",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do grupo de equipamento é inválido ou não foi informado.'... | Lista todos os direitos de grupos de usuário em um grupo de equipamento.
:param id_grupo_equipamento: Identificador do grupo de equipamento para filtrar a pesquisa.
:return: Dicionário com a seguinte estrutura:
::
{'direito_grupo_equipamento':
[{'id_grupo_equipamento'... | [
"Lista",
"todos",
"os",
"direitos",
"de",
"grupos",
"de",
"usuário",
"em",
"um",
"grupo",
"de",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L99-L133 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.buscar_por_id | def buscar_por_id(self, id_direito):
"""Obtém os direitos de um grupo de usuário e um grupo de equipamento.
:param id_direito: Identificador do direito grupo equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'direito_grupo_equipamento':
{'id_grupo... | python | def buscar_por_id(self, id_direito):
"""Obtém os direitos de um grupo de usuário e um grupo de equipamento.
:param id_direito: Identificador do direito grupo equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'direito_grupo_equipamento':
{'id_grupo... | [
"def",
"buscar_por_id",
"(",
"self",
",",
"id_direito",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_direito",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do direito grupo equipamento é inválido ou não foi informado.')",
"",
"url",
"=",
"'... | Obtém os direitos de um grupo de usuário e um grupo de equipamento.
:param id_direito: Identificador do direito grupo equipamento.
:return: Dicionário com a seguinte estrutura:
::
{'direito_grupo_equipamento':
{'id_grupo_equipamento': < id_grupo_equipamento >,
... | [
"Obtém",
"os",
"direitos",
"de",
"um",
"grupo",
"de",
"usuário",
"e",
"um",
"grupo",
"de",
"equipamento",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L135-L168 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.inserir | def inserir(
self,
id_grupo_usuario,
id_grupo_equipamento,
leitura,
escrita,
alterar_config,
exclusao):
"""Cria um novo direito de um grupo de usuário em um grupo de equipamento e retorna o seu identificador.
:param id_... | python | def inserir(
self,
id_grupo_usuario,
id_grupo_equipamento,
leitura,
escrita,
alterar_config,
exclusao):
"""Cria um novo direito de um grupo de usuário em um grupo de equipamento e retorna o seu identificador.
:param id_... | [
"def",
"inserir",
"(",
"self",
",",
"id_grupo_usuario",
",",
"id_grupo_equipamento",
",",
"leitura",
",",
"escrita",
",",
"alterar_config",
",",
"exclusao",
")",
":",
"direito_map",
"=",
"dict",
"(",
")",
"direito_map",
"[",
"'id_grupo_usuario'",
"]",
"=",
"id... | Cria um novo direito de um grupo de usuário em um grupo de equipamento e retorna o seu identificador.
:param id_grupo_usuario: Identificador do grupo de usuário.
:param id_grupo_equipamento: Identificador do grupo de equipamento.
:param leitura: Indicação de permissão de leitura ('0' ou '1').
... | [
"Cria",
"um",
"novo",
"direito",
"de",
"um",
"grupo",
"de",
"usuário",
"em",
"um",
"grupo",
"de",
"equipamento",
"e",
"retorna",
"o",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L170-L209 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.alterar | def alterar(self, id_direito, leitura, escrita, alterar_config, exclusao):
"""Altera os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento.
:param leitura: Indicação de permissão de leitura ('0'... | python | def alterar(self, id_direito, leitura, escrita, alterar_config, exclusao):
"""Altera os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento.
:param leitura: Indicação de permissão de leitura ('0'... | [
"def",
"alterar",
"(",
"self",
",",
"id_direito",
",",
"leitura",
",",
"escrita",
",",
"alterar_config",
",",
"exclusao",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_direito",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do direito... | Altera os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento.
:param leitura: Indicação de permissão de leitura ('0' ou '1').
:param escrita: Indicação de permissão de escrita ('0' ou '1').
... | [
"Altera",
"os",
"direitos",
"de",
"um",
"grupo",
"de",
"usuário",
"em",
"um",
"grupo",
"de",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L211-L243 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/DireitoGrupoEquipamento.py | DireitoGrupoEquipamento.remover | def remover(self, id_direito):
"""Remove os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento
:return: None
:raise DireitoGrupoEquipamentoNaoExisteError: Direito Grupo Equipamento não... | python | def remover(self, id_direito):
"""Remove os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento
:return: None
:raise DireitoGrupoEquipamentoNaoExisteError: Direito Grupo Equipamento não... | [
"def",
"remover",
"(",
"self",
",",
"id_direito",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_direito",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O identificador do direito grupo equipamento é inválido ou não foi informado.')",
"",
"url",
"=",
"'direit... | Remove os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador.
:param id_direito: Identificador do direito grupo equipamento
:return: None
:raise DireitoGrupoEquipamentoNaoExisteError: Direito Grupo Equipamento não cadastrado.
:raise InvalidParamet... | [
"Remove",
"os",
"direitos",
"de",
"um",
"grupo",
"de",
"usuário",
"em",
"um",
"grupo",
"de",
"equipamento",
"a",
"partir",
"do",
"seu",
"identificador",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L245-L265 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermission.py | ApiObjectGroupPermission.search | def search(self, **kwargs):
"""
Method to search object group permissions based on extends search.
:param search: Dict containing QuerySets to find object group permissions.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields t... | python | def search(self, **kwargs):
"""
Method to search object group permissions based on extends search.
:param search: Dict containing QuerySets to find object group permissions.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields t... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiObjectGroupPermission",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/object-group-perm/'",
",",
"kwargs",
")",
")"
] | Method to search object group permissions based on extends search.
:param search: Dict containing QuerySets to find object group permissions.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: A... | [
"Method",
"to",
"search",
"object",
"group",
"permissions",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermission.py | ApiObjectGroupPermission.delete | def delete(self, ids):
"""
Method to delete object group permissions by their ids
:param ids: Identifiers of object group permissions
:return: None
"""
url = build_uri_with_ids('api/v3/object-group-perm/%s/', ids)
return super(ApiObjectGroupPermission, self).dele... | python | def delete(self, ids):
"""
Method to delete object group permissions by their ids
:param ids: Identifiers of object group permissions
:return: None
"""
url = build_uri_with_ids('api/v3/object-group-perm/%s/', ids)
return super(ApiObjectGroupPermission, self).dele... | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/object-group-perm/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiObjectGroupPermission",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete object group permissions by their ids
:param ids: Identifiers of object group permissions
:return: None | [
"Method",
"to",
"delete",
"object",
"group",
"permissions",
"by",
"their",
"ids"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermission.py | ApiObjectGroupPermission.update | def update(self, ogps):
"""
Method to update object group permissions
:param ogps: List containing object group permissions desired to updated
:return: None
"""
data = {'ogps': ogps}
ogps_ids = [str(ogp.get('id')) for ogp in ogps]
return super(ApiObject... | python | def update(self, ogps):
"""
Method to update object group permissions
:param ogps: List containing object group permissions desired to updated
:return: None
"""
data = {'ogps': ogps}
ogps_ids = [str(ogp.get('id')) for ogp in ogps]
return super(ApiObject... | [
"def",
"update",
"(",
"self",
",",
"ogps",
")",
":",
"data",
"=",
"{",
"'ogps'",
":",
"ogps",
"}",
"ogps_ids",
"=",
"[",
"str",
"(",
"ogp",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"ogp",
"in",
"ogps",
"]",
"return",
"super",
"(",
"ApiObjectGrou... | Method to update object group permissions
:param ogps: List containing object group permissions desired to updated
:return: None | [
"Method",
"to",
"update",
"object",
"group",
"permissions"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiObjectGroupPermission.py | ApiObjectGroupPermission.create | def create(self, ogps):
"""
Method to create object group permissions
:param ogps: List containing vrf desired to be created on database
:return: None
"""
data = {'ogps': ogps}
return super(ApiObjectGroupPermission, self).post('api/v3/object-group-perm/', data) | python | def create(self, ogps):
"""
Method to create object group permissions
:param ogps: List containing vrf desired to be created on database
:return: None
"""
data = {'ogps': ogps}
return super(ApiObjectGroupPermission, self).post('api/v3/object-group-perm/', data) | [
"def",
"create",
"(",
"self",
",",
"ogps",
")",
":",
"data",
"=",
"{",
"'ogps'",
":",
"ogps",
"}",
"return",
"super",
"(",
"ApiObjectGroupPermission",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/object-group-perm/'",
",",
"data",
")"
] | Method to create object group permissions
:param ogps: List containing vrf desired to be created on database
:return: None | [
"Method",
"to",
"create",
"object",
"group",
"permissions"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EquipamentoRoteiro.py | EquipamentoRoteiro.inserir | def inserir(self, id_equipment, id_script):
"""Inserts a new Related Equipment with Script and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_script: Identifier of the Script. Integer value and greater than zero.
... | python | def inserir(self, id_equipment, id_script):
"""Inserts a new Related Equipment with Script and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_script: Identifier of the Script. Integer value and greater than zero.
... | [
"def",
"inserir",
"(",
"self",
",",
"id_equipment",
",",
"id_script",
")",
":",
"equipment_script_map",
"=",
"dict",
"(",
")",
"equipment_script_map",
"[",
"'id_equipment'",
"]",
"=",
"id_equipment",
"equipment_script_map",
"[",
"'id_script'",
"]",
"=",
"id_script... | Inserts a new Related Equipment with Script and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:return: Dictionary with the following structure:
... | [
"Inserts",
"a",
"new",
"Related",
"Equipment",
"with",
"Script",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoRoteiro.py#L105-L131 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVrf.py | ApiVrf.search | def search(self, **kwargs):
"""
Method to search vrf's based on extends search.
:param search: Dict containing QuerySets to find vrf'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 vrf's based on extends search.
:param search: Dict containing QuerySets to find vrf'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",
"(",
"ApiVrf",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/vrf/'",
",",
"kwargs",
")",
")"
] | Method to search vrf's based on extends search.
:param search: Dict containing QuerySets to find vrf'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",
"vrf",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVrf.py | ApiVrf.delete | def delete(self, ids):
"""
Method to delete vrf's by their id's
:param ids: Identifiers of vrf's
:return: None
"""
url = build_uri_with_ids('api/v3/vrf/%s/', ids)
return super(ApiVrf, self).delete(url) | python | def delete(self, ids):
"""
Method to delete vrf's by their id's
:param ids: Identifiers of vrf's
:return: None
"""
url = build_uri_with_ids('api/v3/vrf/%s/', ids)
return super(ApiVrf, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/vrf/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiVrf",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete vrf's by their id's
:param ids: Identifiers of vrf's
:return: None | [
"Method",
"to",
"delete",
"vrf",
"s",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L66-L75 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVrf.py | ApiVrf.update | def update(self, vrfs):
"""
Method to update vrf's
:param vrfs: List containing vrf's desired to updated
:return: None
"""
data = {'vrfs': vrfs}
vrfs_ids = [str(vrf.get('id')) for vrf in vrfs]
return super(ApiVrf, self).put('api/v3/vrf/%s/' %
... | python | def update(self, vrfs):
"""
Method to update vrf's
:param vrfs: List containing vrf's desired to updated
:return: None
"""
data = {'vrfs': vrfs}
vrfs_ids = [str(vrf.get('id')) for vrf in vrfs]
return super(ApiVrf, self).put('api/v3/vrf/%s/' %
... | [
"def",
"update",
"(",
"self",
",",
"vrfs",
")",
":",
"data",
"=",
"{",
"'vrfs'",
":",
"vrfs",
"}",
"vrfs_ids",
"=",
"[",
"str",
"(",
"vrf",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"vrf",
"in",
"vrfs",
"]",
"return",
"super",
"(",
"ApiVrf",
",... | Method to update vrf's
:param vrfs: List containing vrf's desired to updated
:return: None | [
"Method",
"to",
"update",
"vrf",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L77-L89 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiVrf.py | ApiVrf.create | def create(self, vrfs):
"""
Method to create vrf's
:param vrfs: List containing vrf's desired to be created on database
:return: None
"""
data = {'vrfs': vrfs}
return super(ApiVrf, self).post('api/v3/vrf/', data) | python | def create(self, vrfs):
"""
Method to create vrf's
:param vrfs: List containing vrf's desired to be created on database
:return: None
"""
data = {'vrfs': vrfs}
return super(ApiVrf, self).post('api/v3/vrf/', data) | [
"def",
"create",
"(",
"self",
",",
"vrfs",
")",
":",
"data",
"=",
"{",
"'vrfs'",
":",
"vrfs",
"}",
"return",
"super",
"(",
"ApiVrf",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/vrf/'",
",",
"data",
")"
] | Method to create vrf's
:param vrfs: List containing vrf's desired to be created on database
:return: None | [
"Method",
"to",
"create",
"vrf",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L91-L100 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/TipoEquipamento.py | TipoEquipamento.inserir | def inserir(self, name):
"""Inserts a new Equipment Type and returns its identifier
:param name: Equipment Type name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'tipo_equipamento': {'id': < id_equipment_ype ... | python | def inserir(self, name):
"""Inserts a new Equipment Type and returns its identifier
:param name: Equipment Type name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'tipo_equipamento': {'id': < id_equipment_ype ... | [
"def",
"inserir",
"(",
"self",
",",
"name",
")",
":",
"equipment_type_map",
"=",
"dict",
"(",
")",
"equipment_type_map",
"[",
"'name'",
"]",
"=",
"name",
"url",
"=",
"'equipmenttype/'",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'equipmen... | Inserts a new Equipment Type and returns its identifier
:param name: Equipment Type name. String with a minimum 3 and maximum of 100 characters
:return: Dictionary with the following structure:
::
{'tipo_equipamento': {'id': < id_equipment_ype >}}
:raise InvalidParameter... | [
"Inserts",
"a",
"new",
"Equipment",
"Type",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoEquipamento.py#L55-L79 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EquipamentoAmbiente.py | EquipamentoAmbiente.inserir | def inserir(self, id_equipment, id_environment, is_router=0):
"""Inserts a new Related Equipment with Environment and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value... | python | def inserir(self, id_equipment, id_environment, is_router=0):
"""Inserts a new Related Equipment with Environment and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value... | [
"def",
"inserir",
"(",
"self",
",",
"id_equipment",
",",
"id_environment",
",",
"is_router",
"=",
"0",
")",
":",
"equipment_environment_map",
"=",
"dict",
"(",
")",
"equipment_environment_map",
"[",
"'id_equipamento'",
"]",
"=",
"id_equipment",
"equipment_environmen... | Inserts a new Related Equipment with Environment and returns its identifier
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:param is_router: Identifier of the Envir... | [
"Inserts",
"a",
"new",
"Related",
"Equipment",
"with",
"Environment",
"and",
"returns",
"its",
"identifier"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L38-L66 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EquipamentoAmbiente.py | EquipamentoAmbiente.remover | def remover(self, id_equipment, id_environment):
"""Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater than zero.... | python | def remover(self, id_equipment, id_environment):
"""Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater than zero.... | [
"def",
"remover",
"(",
"self",
",",
"id_equipment",
",",
"id_environment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Equipment is invalid or was not informed.'",
")",
"if",
"no... | Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:return: None
:raise InvalidParameterErro... | [
"Remove",
"Related",
"Equipment",
"with",
"Environment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L68-L97 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EquipamentoAmbiente.py | EquipamentoAmbiente.update | def update(self, id_equipment, id_environment, is_router):
"""Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater ... | python | def update(self, id_equipment, id_environment, is_router):
"""Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater ... | [
"def",
"update",
"(",
"self",
",",
"id_equipment",
",",
"id_environment",
",",
"is_router",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Equipment is invalid or was not informed.'",... | Remove Related Equipment with Environment from by the identifier.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:param id_environment: Identifier of the Environment. Integer value and greater than zero.
:param is_router: Identifier of the Environment. Bo... | [
"Remove",
"Related",
"Equipment",
"with",
"Environment",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L99-L132 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.remove_connection | def remove_connection(self, interface1, interface2):
"""Remove a connection between two interfaces"""
uri = "api/interface/disconnect/%s/%s/" % (interface1, interface2)
return self.delete(uri) | python | def remove_connection(self, interface1, interface2):
"""Remove a connection between two interfaces"""
uri = "api/interface/disconnect/%s/%s/" % (interface1, interface2)
return self.delete(uri) | [
"def",
"remove_connection",
"(",
"self",
",",
"interface1",
",",
"interface2",
")",
":",
"uri",
"=",
"\"api/interface/disconnect/%s/%s/\"",
"%",
"(",
"interface1",
",",
"interface2",
")",
"return",
"self",
".",
"delete",
"(",
"uri",
")"
] | Remove a connection between two interfaces | [
"Remove",
"a",
"connection",
"between",
"two",
"interfaces"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L56-L61 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.search | def search(self, **kwargs):
"""
Method to search interfaces based on extends search.
:return: Dict containing interfaces.
"""
return super(ApiInterfaceRequest, self).get(self.prepare_url('api/v3/interface/', kwargs)) | python | def search(self, **kwargs):
"""
Method to search interfaces based on extends search.
:return: Dict containing interfaces.
"""
return super(ApiInterfaceRequest, self).get(self.prepare_url('api/v3/interface/', kwargs)) | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/interface/'",
",",
"kwargs",
")",
")"
] | Method to search interfaces based on extends search.
:return: Dict containing interfaces. | [
"Method",
"to",
"search",
"interfaces",
"based",
"on",
"extends",
"search",
".",
":",
"return",
":",
"Dict",
"containing",
"interfaces",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L63-L69 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.get | def get(self, ids, **kwargs):
"""
Method to get interfaces by their ids.
:param ids: List containing identifiers of interfaces.
:return: Dict containing interfaces.
"""
url = build_uri_with_ids('api/v3/interface/%s/', ids)
return super(ApiInterfaceRequest, self)... | python | def get(self, ids, **kwargs):
"""
Method to get interfaces by their ids.
:param ids: List containing identifiers of interfaces.
:return: Dict containing interfaces.
"""
url = build_uri_with_ids('api/v3/interface/%s/', ids)
return super(ApiInterfaceRequest, self)... | [
"def",
"get",
"(",
"self",
",",
"ids",
",",
"*",
"*",
"kwargs",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/interface/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"... | Method to get interfaces by their ids.
:param ids: List containing identifiers of interfaces.
:return: Dict containing interfaces. | [
"Method",
"to",
"get",
"interfaces",
"by",
"their",
"ids",
".",
":",
"param",
"ids",
":",
"List",
"containing",
"identifiers",
"of",
"interfaces",
".",
":",
"return",
":",
"Dict",
"containing",
"interfaces",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L71-L80 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.remove | def remove(self, ids, **kwargs):
"""
Method to delete interface by id.
:param ids: List containing identifiers of interfaces.
"""
url = build_uri_with_ids('api/v3/interface/%s/', ids)
return super(ApiInterfaceRequest, self).delete(self.prepare_url(url, kwargs)) | python | def remove(self, ids, **kwargs):
"""
Method to delete interface by id.
:param ids: List containing identifiers of interfaces.
"""
url = build_uri_with_ids('api/v3/interface/%s/', ids)
return super(ApiInterfaceRequest, self).delete(self.prepare_url(url, kwargs)) | [
"def",
"remove",
"(",
"self",
",",
"ids",
",",
"*",
"*",
"kwargs",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/interface/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"delete",
"(",
"self",
".... | Method to delete interface by id.
:param ids: List containing identifiers of interfaces. | [
"Method",
"to",
"delete",
"interface",
"by",
"id",
".",
":",
"param",
"ids",
":",
"List",
"containing",
"identifiers",
"of",
"interfaces",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L82-L89 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.create | def create(self, interface):
"""
Method to add an interface.
:param interface: List containing interface's desired to be created on database.
:return: Id.
"""
data = {'interfaces': interface}
return super(ApiInterfaceRequest, self).post('api/v3/interface/', data) | python | def create(self, interface):
"""
Method to add an interface.
:param interface: List containing interface's desired to be created on database.
:return: Id.
"""
data = {'interfaces': interface}
return super(ApiInterfaceRequest, self).post('api/v3/interface/', data) | [
"def",
"create",
"(",
"self",
",",
"interface",
")",
":",
"data",
"=",
"{",
"'interfaces'",
":",
"interface",
"}",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/interface/'",
",",
"data",
")"
] | Method to add an interface.
:param interface: List containing interface's desired to be created on database.
:return: Id. | [
"Method",
"to",
"add",
"an",
"interface",
".",
":",
"param",
"interface",
":",
"List",
"containing",
"interface",
"s",
"desired",
"to",
"be",
"created",
"on",
"database",
".",
":",
"return",
":",
"Id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L91-L99 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.update | def update(self, interfaces=None):
"""
Method to update interface.
:param interfaces: List containing interface's desired to be updated on database.
:return: None.
"""
data = {'interfaces': interfaces}
return super(ApiInterfaceRequest, self).put('api/v3/interfac... | python | def update(self, interfaces=None):
"""
Method to update interface.
:param interfaces: List containing interface's desired to be updated on database.
:return: None.
"""
data = {'interfaces': interfaces}
return super(ApiInterfaceRequest, self).put('api/v3/interfac... | [
"def",
"update",
"(",
"self",
",",
"interfaces",
"=",
"None",
")",
":",
"data",
"=",
"{",
"'interfaces'",
":",
"interfaces",
"}",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"put",
"(",
"'api/v3/interface/'",
",",
"data",
")"
] | Method to update interface.
:param interfaces: List containing interface's desired to be updated on database.
:return: None. | [
"Method",
"to",
"update",
"interface",
".",
":",
"param",
"interfaces",
":",
"List",
"containing",
"interface",
"s",
"desired",
"to",
"be",
"updated",
"on",
"database",
".",
":",
"return",
":",
"None",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L115-L124 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.associate_interface_environments | def associate_interface_environments(self, int_env_map):
"""
Method to add an interface.
:param int_env_map: List containing interfaces and environments ids desired to be associates.
:return: Id.
"""
data = {'interface_environments': int_env_map}
return super(Api... | python | def associate_interface_environments(self, int_env_map):
"""
Method to add an interface.
:param int_env_map: List containing interfaces and environments ids desired to be associates.
:return: Id.
"""
data = {'interface_environments': int_env_map}
return super(Api... | [
"def",
"associate_interface_environments",
"(",
"self",
",",
"int_env_map",
")",
":",
"data",
"=",
"{",
"'interface_environments'",
":",
"int_env_map",
"}",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/interface/environ... | Method to add an interface.
:param int_env_map: List containing interfaces and environments ids desired to be associates.
:return: Id. | [
"Method",
"to",
"add",
"an",
"interface",
".",
":",
"param",
"int_env_map",
":",
"List",
"containing",
"interfaces",
"and",
"environments",
"ids",
"desired",
"to",
"be",
"associates",
".",
":",
"return",
":",
"Id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L140-L148 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.connecting_interfaces | def connecting_interfaces(self, interfaces):
"""
Method to connecting interfaces.
:param interfaces: List containing a dictionary with the interfaces ids and front or back.
:return: 200 OK.
"""
data = {'interfaces': interfaces}
url = 'api/v3/connections/' + str(... | python | def connecting_interfaces(self, interfaces):
"""
Method to connecting interfaces.
:param interfaces: List containing a dictionary with the interfaces ids and front or back.
:return: 200 OK.
"""
data = {'interfaces': interfaces}
url = 'api/v3/connections/' + str(... | [
"def",
"connecting_interfaces",
"(",
"self",
",",
"interfaces",
")",
":",
"data",
"=",
"{",
"'interfaces'",
":",
"interfaces",
"}",
"url",
"=",
"'api/v3/connections/'",
"+",
"str",
"(",
"interfaces",
"[",
"0",
"]",
".",
"get",
"(",
"'id'",
")",
")",
"+",... | Method to connecting interfaces.
:param interfaces: List containing a dictionary with the interfaces ids and front or back.
:return: 200 OK. | [
"Method",
"to",
"connecting",
"interfaces",
".",
":",
"param",
"interfaces",
":",
"List",
"containing",
"a",
"dictionary",
"with",
"the",
"interfaces",
"ids",
"and",
"front",
"or",
"back",
".",
":",
"return",
":",
"200",
"OK",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L161-L172 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.disconnecting_interfaces | def disconnecting_interfaces(self, interfaces, **kwargs):
"""
Method to remove the link between interfaces.
:param interfaces: List of ids.
:return: 200 OK.
"""
url = 'api/v3/connections/' + str(interfaces[0]) + '/' + str(interfaces[1]) + '/'
return super(ApiInt... | python | def disconnecting_interfaces(self, interfaces, **kwargs):
"""
Method to remove the link between interfaces.
:param interfaces: List of ids.
:return: 200 OK.
"""
url = 'api/v3/connections/' + str(interfaces[0]) + '/' + str(interfaces[1]) + '/'
return super(ApiInt... | [
"def",
"disconnecting_interfaces",
"(",
"self",
",",
"interfaces",
",",
"*",
"*",
"kwargs",
")",
":",
"url",
"=",
"'api/v3/connections/'",
"+",
"str",
"(",
"interfaces",
"[",
"0",
"]",
")",
"+",
"'/'",
"+",
"str",
"(",
"interfaces",
"[",
"1",
"]",
")",... | Method to remove the link between interfaces.
:param interfaces: List of ids.
:return: 200 OK. | [
"Method",
"to",
"remove",
"the",
"link",
"between",
"interfaces",
".",
":",
"param",
"interfaces",
":",
"List",
"of",
"ids",
".",
":",
"return",
":",
"200",
"OK",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L174-L183 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.create_channel | def create_channel(self, channel):
"""
Method to create a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id.
"""
data = {'channels': channel}
return super(ApiInterfaceRequest, self).post('api/v3/channel/', data) | python | def create_channel(self, channel):
"""
Method to create a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id.
"""
data = {'channels': channel}
return super(ApiInterfaceRequest, self).post('api/v3/channel/', data) | [
"def",
"create_channel",
"(",
"self",
",",
"channel",
")",
":",
"data",
"=",
"{",
"'channels'",
":",
"channel",
"}",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/channel/'",
",",
"data",
")"
] | Method to create a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id. | [
"Method",
"to",
"create",
"a",
"channel",
".",
":",
"param",
"channel",
":",
"List",
"containing",
"channel",
"s",
"desired",
"to",
"be",
"created",
"on",
"database",
".",
":",
"return",
":",
"Id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L187-L195 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiInterface.py | ApiInterfaceRequest.update_channel | def update_channel(self, channel):
"""
Method to update a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id.
"""
data = {'channels': channel}
return super(ApiInterfaceRequest, self).put('api/v3/channel/', data) | python | def update_channel(self, channel):
"""
Method to update a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id.
"""
data = {'channels': channel}
return super(ApiInterfaceRequest, self).put('api/v3/channel/', data) | [
"def",
"update_channel",
"(",
"self",
",",
"channel",
")",
":",
"data",
"=",
"{",
"'channels'",
":",
"channel",
"}",
"return",
"super",
"(",
"ApiInterfaceRequest",
",",
"self",
")",
".",
"put",
"(",
"'api/v3/channel/'",
",",
"data",
")"
] | Method to update a channel.
:param channel: List containing channel's desired to be created on database.
:return: Id. | [
"Method",
"to",
"update",
"a",
"channel",
".",
":",
"param",
"channel",
":",
"List",
"containing",
"channel",
"s",
"desired",
"to",
"be",
"created",
"on",
"database",
".",
":",
"return",
":",
"Id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L197-L205 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoL3.py | GrupoL3.inserir | def inserir(self, name):
"""Inserts a new Group L3 and returns its identifier.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'group_l3': {'id': < id_group_l3 >}}
:raise Inval... | python | def inserir(self, name):
"""Inserts a new Group L3 and returns its identifier.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'group_l3': {'id': < id_group_l3 >}}
:raise Inval... | [
"def",
"inserir",
"(",
"self",
",",
"name",
")",
":",
"group_l3_map",
"=",
"dict",
"(",
")",
"group_l3_map",
"[",
"'name'",
"]",
"=",
"name",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'group_l3'",
":",
"group_l3_map",
"}",
",",
"'POS... | Inserts a new Group L3 and returns its identifier.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: Dictionary with the following structure:
::
{'group_l3': {'id': < id_group_l3 >}}
:raise InvalidParameterError: Name is null and i... | [
"Inserts",
"a",
"new",
"Group",
"L3",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L58-L80 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoL3.py | GrupoL3.alterar | def alterar(self, id_groupl3, name):
"""Change Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: None
:raise InvalidPara... | python | def alterar(self, id_groupl3, name):
"""Change Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: None
:raise InvalidPara... | [
"def",
"alterar",
"(",
"self",
",",
"id_groupl3",
",",
"name",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_groupl3",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group L3 is invalid or was not informed.'",
")",
"url",
"=",
"'groupl3/... | Change Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:param name: Group L3 name. String with a minimum 2 and maximum of 80 characters
:return: None
:raise InvalidParameterError: The identifier of Group L3 or name i... | [
"Change",
"Group",
"L3",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L82-L108 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoL3.py | GrupoL3.remover | def remover(self, id_groupl3):
"""Remove Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Group L3 is null and invalid.
:raise GrupoL3NaoExisteErro... | python | def remover(self, id_groupl3):
"""Remove Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Group L3 is null and invalid.
:raise GrupoL3NaoExisteErro... | [
"def",
"remover",
"(",
"self",
",",
"id_groupl3",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_groupl3",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group L3 is invalid or was not informed.'",
")",
"url",
"=",
"'groupl3/'",
"+",
"str... | Remove Group L3 from by the identifier.
:param id_groupl3: Identifier of the Group L3. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Group L3 is null and invalid.
:raise GrupoL3NaoExisteError: Group L3 not registered.
:raise... | [
"Remove",
"Group",
"L3",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L110-L131 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.get | def get(self, url, auth_map=None):
"""Envia uma requisição GET para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As chaves e os seus valores são enviados no h... | python | def get(self, url, auth_map=None):
"""Envia uma requisição GET para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As chaves e os seus valores são enviados no h... | [
"def",
"get",
"(",
"self",
",",
"url",
",",
"auth_map",
"=",
"None",
")",
":",
"try",
":",
"LOG",
".",
"debug",
"(",
"'GET %s'",
",",
"url",
")",
"request",
"=",
"Request",
"(",
"url",
")",
"if",
"auth_map",
"is",
"not",
"None",
":",
"for",
"key"... | Envia uma requisição GET para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As chaves e os seus valores são enviados no header da requisição.
:param url: URL ... | [
"Envia",
"uma",
"requisição",
"GET",
"para",
"a",
"URL",
"informada",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L78-L117 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.put | def put(self, url, request_data, content_type=None, auth_map=None):
"""Envia uma requisição PUT para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As ... | python | def put(self, url, request_data, content_type=None, auth_map=None):
"""Envia uma requisição PUT para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As ... | [
"def",
"put",
"(",
"self",
",",
"url",
",",
"request_data",
",",
"content_type",
"=",
"None",
",",
"auth_map",
"=",
"None",
")",
":",
"try",
":",
"LOG",
".",
"debug",
"(",
"'PUT %s\\n%s'",
",",
"url",
",",
"request_data",
")",
"parsed_url",
"=",
"urlpa... | Envia uma requisição PUT para a URL informada.
Se auth_map é diferente de None, então deverá conter as
chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar
a autenticação na networkAPI.
As chaves e os seus valores são enviados no header da requisição.
:param ... | [
"Envia",
"uma",
"requisição",
"PUT",
"para",
"a",
"URL",
"informada",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L235-L294 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.post_map | def post_map(self, url, map, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição POST.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as infor... | python | def post_map(self, url, map, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição POST.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as infor... | [
"def",
"post_map",
"(",
"self",
",",
"url",
",",
"map",
",",
"auth_map",
"=",
"None",
")",
":",
"xml",
"=",
"dumps_networkapi",
"(",
"map",
")",
"response_code",
",",
"content",
"=",
"self",
".",
"post",
"(",
"url",
",",
"xml",
",",
"'text/plain'",
"... | Gera um XML a partir dos dados do dicionário e o envia através de uma requisição POST.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:return... | [
"Gera",
"um",
"XML",
"a",
"partir",
"dos",
"dados",
"do",
"dicionário",
"e",
"o",
"envia",
"através",
"de",
"uma",
"requisição",
"POST",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L296-L311 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.put_map | def put_map(self, url, map, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição PUT.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as informa... | python | def put_map(self, url, map, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição PUT.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as informa... | [
"def",
"put_map",
"(",
"self",
",",
"url",
",",
"map",
",",
"auth_map",
"=",
"None",
")",
":",
"xml",
"=",
"dumps_networkapi",
"(",
"map",
")",
"response_code",
",",
"content",
"=",
"self",
".",
"put",
"(",
"url",
",",
"xml",
",",
"'text/plain'",
","... | Gera um XML a partir dos dados do dicionário e o envia através de uma requisição PUT.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:return:... | [
"Gera",
"um",
"XML",
"a",
"partir",
"dos",
"dados",
"do",
"dicionário",
"e",
"o",
"envia",
"através",
"de",
"uma",
"requisição",
"PUT",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L313-L328 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.get_map | def get_map(self, url, auth_map=None):
"""Envia uma requisição GET.
:param url: URL para enviar a requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da r... | python | def get_map(self, url, auth_map=None):
"""Envia uma requisição GET.
:param url: URL para enviar a requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da r... | [
"def",
"get_map",
"(",
"self",
",",
"url",
",",
"auth_map",
"=",
"None",
")",
":",
"response_code",
",",
"content",
"=",
"self",
".",
"get",
"(",
"url",
",",
"auth_map",
")",
"return",
"response_code",
",",
"content"
] | Envia uma requisição GET.
:param url: URL para enviar a requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da resposta >).
:raise ConnectionError: Falha... | [
"Envia",
"uma",
"requisição",
"GET",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L330-L343 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.delete_map | def delete_map(self, url, map=None, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição DELETE.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com... | python | def delete_map(self, url, map=None, auth_map=None):
"""Gera um XML a partir dos dados do dicionário e o envia através de uma requisição DELETE.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com... | [
"def",
"delete_map",
"(",
"self",
",",
"url",
",",
"map",
"=",
"None",
",",
"auth_map",
"=",
"None",
")",
":",
"xml",
"=",
"None",
"if",
"map",
"is",
"not",
"None",
":",
"xml",
"=",
"dumps_networkapi",
"(",
"map",
")",
"response_code",
",",
"content"... | Gera um XML a partir dos dados do dicionário e o envia através de uma requisição DELETE.
:param url: URL para enviar a requisição HTTP.
:param map: Dicionário com os dados do corpo da requisição HTTP.
:param auth_map: Dicionário com as informações para autenticação na networkAPI.
:retu... | [
"Gera",
"um",
"XML",
"a",
"partir",
"dos",
"dados",
"do",
"dicionário",
"e",
"o",
"envia",
"através",
"de",
"uma",
"requisição",
"DELETE",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L345-L362 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | Rest.get_full_url | def get_full_url(self, parsed_url):
""" Returns url path with querystring """
full_path = parsed_url.path
if parsed_url.query:
full_path = '%s?%s' % (full_path, parsed_url.query)
return full_path | python | def get_full_url(self, parsed_url):
""" Returns url path with querystring """
full_path = parsed_url.path
if parsed_url.query:
full_path = '%s?%s' % (full_path, parsed_url.query)
return full_path | [
"def",
"get_full_url",
"(",
"self",
",",
"parsed_url",
")",
":",
"full_path",
"=",
"parsed_url",
".",
"path",
"if",
"parsed_url",
".",
"query",
":",
"full_path",
"=",
"'%s?%s'",
"%",
"(",
"full_path",
",",
"parsed_url",
".",
"query",
")",
"return",
"full_p... | Returns url path with querystring | [
"Returns",
"url",
"path",
"with",
"querystring"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L371-L376 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/rest.py | RestRequest.submit | def submit(self, map):
'''Envia a requisição HTTP de acordo com os parâmetros informados no construtor.
:param map: Dicionário com os dados do corpo da requisição.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da resposta >).
:raise ConnectionE... | python | def submit(self, map):
'''Envia a requisição HTTP de acordo com os parâmetros informados no construtor.
:param map: Dicionário com os dados do corpo da requisição.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da resposta >).
:raise ConnectionE... | [
"def",
"submit",
"(",
"self",
",",
"map",
")",
":",
"# print \"Requição em %s %s com corpo: %s\" % (self.method, self.url,",
"# map)",
"rest",
"=",
"Rest",
"(",
")",
"if",
"self",
".",
"method",
"==",
"'POST'",
":",
"code",
",",
"response",
"=",
"rest",
".",
"... | Envia a requisição HTTP de acordo com os parâmetros informados no construtor.
:param map: Dicionário com os dados do corpo da requisição.
:return: Retorna uma tupla contendo:
(< código de resposta http >, < corpo da resposta >).
:raise ConnectionError: Falha na conexão com a netwo... | [
"Envia",
"a",
"requisição",
"HTTP",
"de",
"acordo",
"com",
"os",
"parâmetros",
"informados",
"no",
"construtor",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L400-L423 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4VirtualInterface.py | ApiV4VirtualInterface.search | def search(self, **kwargs):
"""
Method to search Virtual Interfaces based on extends search.
:param search: Dict containing QuerySets to find Virtual Interfaces.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on... | python | def search(self, **kwargs):
"""
Method to search Virtual Interfaces based on extends search.
:param search: Dict containing QuerySets to find Virtual Interfaces.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiV4VirtualInterface",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v4/virtual-interface/'",
",",
"kwargs",
")",
")"
] | Method to search Virtual Interfaces based on extends search.
:param search: Dict containing QuerySets to find Virtual Interfaces.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array contain... | [
"Method",
"to",
"search",
"Virtual",
"Interfaces",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4VirtualInterface.py | ApiV4VirtualInterface.delete | def delete(self, ids):
"""
Method to delete Virtual Interfaces by their id's
:param ids: Identifiers of Virtual Interfaces
:return: None
"""
url = build_uri_with_ids('api/v4/virtual-interface/%s/', ids)
return super(ApiV4VirtualInterface, self).delete(url) | python | def delete(self, ids):
"""
Method to delete Virtual Interfaces by their id's
:param ids: Identifiers of Virtual Interfaces
:return: None
"""
url = build_uri_with_ids('api/v4/virtual-interface/%s/', ids)
return super(ApiV4VirtualInterface, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v4/virtual-interface/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiV4VirtualInterface",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete Virtual Interfaces by their id's
:param ids: Identifiers of Virtual Interfaces
:return: None | [
"Method",
"to",
"delete",
"Virtual",
"Interfaces",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4VirtualInterface.py | ApiV4VirtualInterface.update | def update(self, virtual_interfaces):
"""
Method to update Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to updated
:return: None
"""
data = {'virtual_interfaces': virtual_interfaces}
virtual_interfaces_ids = [str(env.g... | python | def update(self, virtual_interfaces):
"""
Method to update Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to updated
:return: None
"""
data = {'virtual_interfaces': virtual_interfaces}
virtual_interfaces_ids = [str(env.g... | [
"def",
"update",
"(",
"self",
",",
"virtual_interfaces",
")",
":",
"data",
"=",
"{",
"'virtual_interfaces'",
":",
"virtual_interfaces",
"}",
"virtual_interfaces_ids",
"=",
"[",
"str",
"(",
"env",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"env",
"in",
"virt... | Method to update Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to updated
:return: None | [
"Method",
"to",
"update",
"Virtual",
"Interfaces"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4VirtualInterface.py | ApiV4VirtualInterface.create | def create(self, virtual_interfaces):
"""
Method to create Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to be created on database
:return: None
"""
data = {'virtual_interfaces': virtual_interfaces}
return super(ApiV4Vi... | python | def create(self, virtual_interfaces):
"""
Method to create Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to be created on database
:return: None
"""
data = {'virtual_interfaces': virtual_interfaces}
return super(ApiV4Vi... | [
"def",
"create",
"(",
"self",
",",
"virtual_interfaces",
")",
":",
"data",
"=",
"{",
"'virtual_interfaces'",
":",
"virtual_interfaces",
"}",
"return",
"super",
"(",
"ApiV4VirtualInterface",
",",
"self",
")",
".",
"post",
"(",
"'api/v4/virtual-interface/'",
",",
... | Method to create Virtual Interfaces
:param Virtual Interfaces: List containing Virtual Interfaces desired to be created on database
:return: None | [
"Method",
"to",
"create",
"Virtual",
"Interfaces"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L89-L99 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoUsuario.py | GrupoUsuario.search | def search(self, id_ugroup):
"""Search Group User by its identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Following dictionary:
::
{‘user_group’: {'escrita': < escrita >,
'nome': < nome >,
'e... | python | def search(self, id_ugroup):
"""Search Group User by its identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Following dictionary:
::
{‘user_group’: {'escrita': < escrita >,
'nome': < nome >,
'e... | [
"def",
"search",
"(",
"self",
",",
"id_ugroup",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_ugroup",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Group User is invalid or was not informed.'",
")",
"url",
"=",
"'ugroup/get/'",
"+",
"s... | Search Group User by its identifier.
:param id_ugroup: Identifier of the Group User. Integer value and greater than zero.
:return: Following dictionary:
::
{‘user_group’: {'escrita': < escrita >,
'nome': < nome >,
'exclusao': < exclusao >,
'edi... | [
"Search",
"Group",
"User",
"by",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L38-L68 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoUsuario.py | GrupoUsuario.inserir | def inserir(self, name, read, write, edit, remove):
"""Insert new user group and returns its identifier.
:param name: User group's name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write permission ('S' ou 'N').
:param edit: If us... | python | def inserir(self, name, read, write, edit, remove):
"""Insert new user group and returns its identifier.
:param name: User group's name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write permission ('S' ou 'N').
:param edit: If us... | [
"def",
"inserir",
"(",
"self",
",",
"name",
",",
"read",
",",
"write",
",",
"edit",
",",
"remove",
")",
":",
"ugroup_map",
"=",
"dict",
"(",
")",
"ugroup_map",
"[",
"'nome'",
"]",
"=",
"name",
"ugroup_map",
"[",
"'leitura'",
"]",
"=",
"read",
"ugroup... | Insert new user group and returns its identifier.
:param name: User group's name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write permission ('S' ou 'N').
:param edit: If user group has edit permission ('S' ou 'N').
:param remov... | [
"Insert",
"new",
"user",
"group",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L93-L119 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoUsuario.py | GrupoUsuario.alterar | def alterar(self, id_user_group, name, read, write, edit, remove):
"""Edit user group data from its identifier.
:param id_user_group: User group id.
:param name: User group name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write p... | python | def alterar(self, id_user_group, name, read, write, edit, remove):
"""Edit user group data from its identifier.
:param id_user_group: User group id.
:param name: User group name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write p... | [
"def",
"alterar",
"(",
"self",
",",
"id_user_group",
",",
"name",
",",
"read",
",",
"write",
",",
"edit",
",",
"remove",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_user_group",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Invalid or inexisten... | Edit user group data from its identifier.
:param id_user_group: User group id.
:param name: User group name.
:param read: If user group has read permission ('S' ou 'N').
:param write: If user group has write permission ('S' ou 'N').
:param edit: If user group has edit permission... | [
"Edit",
"user",
"group",
"data",
"from",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L121-L155 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GrupoUsuario.py | GrupoUsuario.remover | def remover(self, id_user_group):
"""Removes a user group by its id.
:param id_user_group: User Group's identifier. Valid integer greater than zero.
:return: None
:raise GrupoUsuarioNaoExisteError: User Group not found.
:raise InvalidParameterError: User Group id is invalid or... | python | def remover(self, id_user_group):
"""Removes a user group by its id.
:param id_user_group: User Group's identifier. Valid integer greater than zero.
:return: None
:raise GrupoUsuarioNaoExisteError: User Group not found.
:raise InvalidParameterError: User Group id is invalid or... | [
"def",
"remover",
"(",
"self",
",",
"id_user_group",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_user_group",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'Invalid or inexistent user group id.'",
")",
"url",
"=",
"'ugroup/'",
"+",
"str",
"(",
"id_u... | Removes a user group by its id.
:param id_user_group: User Group's identifier. Valid integer greater than zero.
:return: None
:raise GrupoUsuarioNaoExisteError: User Group not found.
:raise InvalidParameterError: User Group id is invalid or none.
:raise DataBaseError: Networka... | [
"Removes",
"a",
"user",
"group",
"by",
"its",
"id",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L157-L177 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.get_environment | def get_environment(self, environment_ids):
"""
Method to get environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
return super(ApiEnvironment, self).get(uri) | python | def get_environment(self, environment_ids):
"""
Method to get environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
return super(ApiEnvironment, self).get(uri) | [
"def",
"get_environment",
"(",
"self",
",",
"environment_ids",
")",
":",
"uri",
"=",
"'api/v3/environment/%s/'",
"%",
"environment_ids",
"return",
"super",
"(",
"ApiEnvironment",
",",
"self",
")",
".",
"get",
"(",
"uri",
")"
] | Method to get environment | [
"Method",
"to",
"get",
"environment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L45-L52 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.create_environment | def create_environment(self, environment):
"""
Method to create environment
"""
uri = 'api/v3/environment/'
data = dict()
data['environments'] = list()
data['environments'].append(environment)
return super(ApiEnvironment, self).post(uri, data) | python | def create_environment(self, environment):
"""
Method to create environment
"""
uri = 'api/v3/environment/'
data = dict()
data['environments'] = list()
data['environments'].append(environment)
return super(ApiEnvironment, self).post(uri, data) | [
"def",
"create_environment",
"(",
"self",
",",
"environment",
")",
":",
"uri",
"=",
"'api/v3/environment/'",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'environments'",
"]",
"=",
"list",
"(",
")",
"data",
"[",
"'environments'",
"]",
".",
"append",
"(",
... | Method to create environment | [
"Method",
"to",
"create",
"environment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L54-L65 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.update_environment | def update_environment(self, environment, environment_ids):
"""
Method to update environment
:param environment_ids: Ids of Environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
data = dict()
data['environments'] = list()
data['environments']... | python | def update_environment(self, environment, environment_ids):
"""
Method to update environment
:param environment_ids: Ids of Environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
data = dict()
data['environments'] = list()
data['environments']... | [
"def",
"update_environment",
"(",
"self",
",",
"environment",
",",
"environment_ids",
")",
":",
"uri",
"=",
"'api/v3/environment/%s/'",
"%",
"environment_ids",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'environments'",
"]",
"=",
"list",
"(",
")",
"data",
... | Method to update environment
:param environment_ids: Ids of Environment | [
"Method",
"to",
"update",
"environment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L67-L80 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.delete_environment | def delete_environment(self, environment_ids):
"""
Method to delete environment
:param environment_ids: Ids of Environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
return super(ApiEnvironment, self).delete(uri) | python | def delete_environment(self, environment_ids):
"""
Method to delete environment
:param environment_ids: Ids of Environment
"""
uri = 'api/v3/environment/%s/' % environment_ids
return super(ApiEnvironment, self).delete(uri) | [
"def",
"delete_environment",
"(",
"self",
",",
"environment_ids",
")",
":",
"uri",
"=",
"'api/v3/environment/%s/'",
"%",
"environment_ids",
"return",
"super",
"(",
"ApiEnvironment",
",",
"self",
")",
".",
"delete",
"(",
"uri",
")"
] | Method to delete environment
:param environment_ids: Ids of Environment | [
"Method",
"to",
"delete",
"environment"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L82-L90 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.search | def search(self, **kwargs):
"""
Method to search environments based on extends search.
:param search: Dict containing QuerySets to find environments.
: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 environments based on extends search.
:param search: Dict containing QuerySets to find environments.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiEnvironment",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/environment/'",
",",
"kwargs",
")",
")"
] | Method to search environments based on extends search.
:param search: Dict containing QuerySets to find environments.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields t... | [
"Method",
"to",
"search",
"environments",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L92-L105 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.delete | def delete(self, ids):
"""
Method to delete environments by their id's
:param ids: Identifiers of environments
:return: None
"""
url = build_uri_with_ids('api/v3/environment/%s/', ids)
return super(ApiEnvironment, self).delete(url) | python | def delete(self, ids):
"""
Method to delete environments by their id's
:param ids: Identifiers of environments
:return: None
"""
url = build_uri_with_ids('api/v3/environment/%s/', ids)
return super(ApiEnvironment, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v3/environment/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiEnvironment",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete environments by their id's
:param ids: Identifiers of environments
:return: None | [
"Method",
"to",
"delete",
"environments",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L121-L129 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.update | def update(self, environments):
"""
Method to update environments
:param environments: List containing environments desired to updated
:return: None
"""
data = {'environments': environments}
environments_ids = [str(env.get('id')) for env in environments]
... | python | def update(self, environments):
"""
Method to update environments
:param environments: List containing environments desired to updated
:return: None
"""
data = {'environments': environments}
environments_ids = [str(env.get('id')) for env in environments]
... | [
"def",
"update",
"(",
"self",
",",
"environments",
")",
":",
"data",
"=",
"{",
"'environments'",
":",
"environments",
"}",
"environments_ids",
"=",
"[",
"str",
"(",
"env",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"env",
"in",
"environments",
"]",
"ret... | Method to update environments
:param environments: List containing environments desired to updated
:return: None | [
"Method",
"to",
"update",
"environments"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L131-L143 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiEnvironment.py | ApiEnvironment.create | def create(self, environments):
"""
Method to create environments
:param environments: Dict containing environments desired to be created on database
:return: None
"""
data = {'environments': environments}
return super(ApiEnvironment, self).post('api/v3/environm... | python | def create(self, environments):
"""
Method to create environments
:param environments: Dict containing environments desired to be created on database
:return: None
"""
data = {'environments': environments}
return super(ApiEnvironment, self).post('api/v3/environm... | [
"def",
"create",
"(",
"self",
",",
"environments",
")",
":",
"data",
"=",
"{",
"'environments'",
":",
"environments",
"}",
"return",
"super",
"(",
"ApiEnvironment",
",",
"self",
")",
".",
"post",
"(",
"'api/v3/environment/'",
",",
"data",
")"
] | Method to create environments
:param environments: Dict containing environments desired to be created on database
:return: None | [
"Method",
"to",
"create",
"environments"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L145-L154 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4As.py | ApiV4As.search | def search(self, **kwargs):
"""
Method to search asns based on extends search.
:param search: Dict containing QuerySets to find asns.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fi... | python | def search(self, **kwargs):
"""
Method to search asns based on extends search.
:param search: Dict containing QuerySets to find asns.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fi... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiV4As",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v4/as/'",
",",
"kwargs",
")",
")"
] | Method to search asns based on extends search.
:param search: Dict containing QuerySets to find asns.
: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 defau... | [
"Method",
"to",
"search",
"asns",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4As.py | ApiV4As.delete | def delete(self, ids):
"""
Method to delete asns by their id's
:param ids: Identifiers of asns
:return: None
"""
url = build_uri_with_ids('api/v4/as/%s/', ids)
return super(ApiV4As, self).delete(url) | python | def delete(self, ids):
"""
Method to delete asns by their id's
:param ids: Identifiers of asns
:return: None
"""
url = build_uri_with_ids('api/v4/as/%s/', ids)
return super(ApiV4As, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v4/as/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiV4As",
",",
"self",
")",
".",
"delete",
"(",
"url",
")"
] | Method to delete asns by their id's
:param ids: Identifiers of asns
:return: None | [
"Method",
"to",
"delete",
"asns",
"by",
"their",
"id",
"s"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4As.py | ApiV4As.update | def update(self, asns):
"""
Method to update asns
:param asns: List containing asns desired to updated
:return: None
"""
data = {'asns': asns}
asns_ids = [str(env.get('id')) for env in asns]
return super(ApiV4As, self).put('api/v4/as/%s/' %
... | python | def update(self, asns):
"""
Method to update asns
:param asns: List containing asns desired to updated
:return: None
"""
data = {'asns': asns}
asns_ids = [str(env.get('id')) for env in asns]
return super(ApiV4As, self).put('api/v4/as/%s/' %
... | [
"def",
"update",
"(",
"self",
",",
"asns",
")",
":",
"data",
"=",
"{",
"'asns'",
":",
"asns",
"}",
"asns_ids",
"=",
"[",
"str",
"(",
"env",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"env",
"in",
"asns",
"]",
"return",
"super",
"(",
"ApiV4As",
"... | Method to update asns
:param asns: List containing asns desired to updated
:return: None | [
"Method",
"to",
"update",
"asns"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4As.py | ApiV4As.create | def create(self, asns):
"""
Method to create asns
:param asns: List containing asns desired to be created on database
:return: None
"""
data = {'asns': asns}
return super(ApiV4As, self).post('api/v4/as/', data) | python | def create(self, asns):
"""
Method to create asns
:param asns: List containing asns desired to be created on database
:return: None
"""
data = {'asns': asns}
return super(ApiV4As, self).post('api/v4/as/', data) | [
"def",
"create",
"(",
"self",
",",
"asns",
")",
":",
"data",
"=",
"{",
"'asns'",
":",
"asns",
"}",
"return",
"super",
"(",
"ApiV4As",
",",
"self",
")",
".",
"post",
"(",
"'api/v4/as/'",
",",
"data",
")"
] | Method to create asns
:param asns: List containing asns desired to be created on database
:return: None | [
"Method",
"to",
"create",
"asns"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/EventLog.py | EventLog.find_logs | def find_logs(
self,
user_name,
first_date,
start_time,
last_date,
end_time,
action,
functionality,
parameter,
pagination):
"""
Search all logs, filtering by the given parameters.
... | python | def find_logs(
self,
user_name,
first_date,
start_time,
last_date,
end_time,
action,
functionality,
parameter,
pagination):
"""
Search all logs, filtering by the given parameters.
... | [
"def",
"find_logs",
"(",
"self",
",",
"user_name",
",",
"first_date",
",",
"start_time",
",",
"last_date",
",",
"end_time",
",",
"action",
",",
"functionality",
",",
"parameter",
",",
"pagination",
")",
":",
"if",
"not",
"isinstance",
"(",
"pagination",
",",... | Search all logs, filtering by the given parameters.
:param user_name: Filter by user_name
:param first_date: Sets initial date for begin of the filter
:param start_time: Sets initial time
:param last_date: Sets final date
:param end_time: Sets final time and ends the filter. That... | [
"Search",
"all",
"logs",
"filtering",
"by",
"the",
"given",
"parameters",
".",
":",
"param",
"user_name",
":",
"Filter",
"by",
"user_name",
":",
"param",
"first_date",
":",
"Sets",
"initial",
"date",
"for",
"begin",
"of",
"the",
"filter",
":",
"param",
"st... | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EventLog.py#L40-L106 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4Equipment.py | ApiV4Equipment.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",
"(",
"ApiV4Equipment",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v4/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/ApiV4Equipment.py#L36-L49 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4Equipment.py | ApiV4Equipment.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/v4/equipment/%s/', ids)
return super(ApiV4Equipment, 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/v4/equipment/%s/', ids)
return super(ApiV4Equipment, self).delete(url) | [
"def",
"delete",
"(",
"self",
",",
"ids",
")",
":",
"url",
"=",
"build_uri_with_ids",
"(",
"'api/v4/equipment/%s/'",
",",
"ids",
")",
"return",
"super",
"(",
"ApiV4Equipment",
",",
"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/ApiV4Equipment.py#L65-L73 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4Equipment.py | ApiV4Equipment.update | def update(self, equipments):
"""
Method to update equipments
:param equipments: List containing equipments desired to updated
:return: None
"""
data = {'equipments': equipments}
equipments_ids = [str(env.get('id')) for env in equipments]
return super(A... | python | def update(self, equipments):
"""
Method to update equipments
:param equipments: List containing equipments desired to updated
:return: None
"""
data = {'equipments': equipments}
equipments_ids = [str(env.get('id')) for env in equipments]
return super(A... | [
"def",
"update",
"(",
"self",
",",
"equipments",
")",
":",
"data",
"=",
"{",
"'equipments'",
":",
"equipments",
"}",
"equipments_ids",
"=",
"[",
"str",
"(",
"env",
".",
"get",
"(",
"'id'",
")",
")",
"for",
"env",
"in",
"equipments",
"]",
"return",
"s... | Method to update equipments
:param equipments: List containing equipments desired to updated
:return: None | [
"Method",
"to",
"update",
"equipments"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Equipment.py#L75-L87 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiV4Equipment.py | ApiV4Equipment.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(ApiV4Equipment, self).post('api/v4/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(ApiV4Equipment, self).post('api/v4/equipment/', data) | [
"def",
"create",
"(",
"self",
",",
"equipments",
")",
":",
"data",
"=",
"{",
"'equipments'",
":",
"equipments",
"}",
"return",
"super",
"(",
"ApiV4Equipment",
",",
"self",
")",
".",
"post",
"(",
"'api/v4/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/ApiV4Equipment.py#L89-L98 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GenericClient.py | GenericClient.submit | def submit(self, map, method, postfix):
'''Realiza um requisição HTTP para a networkAPI.
:param map: Dicionário com os dados para gerar o XML enviado no corpo da requisição HTTP.
:param method: Método da requisição HTTP ('GET', 'POST', 'PUT' ou 'DELETE').
:param postfix: Posfixo a ser c... | python | def submit(self, map, method, postfix):
'''Realiza um requisição HTTP para a networkAPI.
:param map: Dicionário com os dados para gerar o XML enviado no corpo da requisição HTTP.
:param method: Método da requisição HTTP ('GET', 'POST', 'PUT' ou 'DELETE').
:param postfix: Posfixo a ser c... | [
"def",
"submit",
"(",
"self",
",",
"map",
",",
"method",
",",
"postfix",
")",
":",
"try",
":",
"rest_request",
"=",
"RestRequest",
"(",
"self",
".",
"get_url",
"(",
"postfix",
")",
",",
"method",
",",
"self",
".",
"user",
",",
"self",
".",
"password"... | Realiza um requisição HTTP para a networkAPI.
:param map: Dicionário com os dados para gerar o XML enviado no corpo da requisição HTTP.
:param method: Método da requisição HTTP ('GET', 'POST', 'PUT' ou 'DELETE').
:param postfix: Posfixo a ser colocado na URL básica de acesso à networkAPI. Ex: /... | [
"Realiza",
"um",
"requisição",
"HTTP",
"para",
"a",
"networkAPI",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L47-L68 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GenericClient.py | GenericClient.get_error | def get_error(self, xml):
'''Obtem do XML de resposta, o código e a descrição do erro.
O XML corresponde ao corpo da resposta HTTP de código 500.
:param xml: XML contido na resposta da requisição HTTP.
:return: Tupla com o código e a descrição do erro contido no XML:
(< co... | python | def get_error(self, xml):
'''Obtem do XML de resposta, o código e a descrição do erro.
O XML corresponde ao corpo da resposta HTTP de código 500.
:param xml: XML contido na resposta da requisição HTTP.
:return: Tupla com o código e a descrição do erro contido no XML:
(< co... | [
"def",
"get_error",
"(",
"self",
",",
"xml",
")",
":",
"map",
"=",
"loads",
"(",
"xml",
")",
"network_map",
"=",
"map",
"[",
"'networkapi'",
"]",
"error_map",
"=",
"network_map",
"[",
"'erro'",
"]",
"return",
"int",
"(",
"error_map",
"[",
"'codigo'",
"... | Obtem do XML de resposta, o código e a descrição do erro.
O XML corresponde ao corpo da resposta HTTP de código 500.
:param xml: XML contido na resposta da requisição HTTP.
:return: Tupla com o código e a descrição do erro contido no XML:
(< codigo_erro>, < descricao_erro>) | [
"Obtem",
"do",
"XML",
"de",
"resposta",
"o",
"código",
"e",
"a",
"descrição",
"do",
"erro",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L70-L83 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/GenericClient.py | GenericClient.response | def response(self, code, xml, force_list=None):
"""Cria um dicionário com os dados de retorno da requisição HTTP ou
lança uma exceção correspondente ao erro ocorrido.
Se a requisição HTTP retornar o código 200 então este método retorna o
dicionário com os dados da resposta.
... | python | def response(self, code, xml, force_list=None):
"""Cria um dicionário com os dados de retorno da requisição HTTP ou
lança uma exceção correspondente ao erro ocorrido.
Se a requisição HTTP retornar o código 200 então este método retorna o
dicionário com os dados da resposta.
... | [
"def",
"response",
"(",
"self",
",",
"code",
",",
"xml",
",",
"force_list",
"=",
"None",
")",
":",
"if",
"int",
"(",
"code",
")",
"==",
"200",
":",
"# Retorna o map",
"return",
"loads",
"(",
"xml",
",",
"force_list",
")",
"[",
"'networkapi'",
"]",
"e... | Cria um dicionário com os dados de retorno da requisição HTTP ou
lança uma exceção correspondente ao erro ocorrido.
Se a requisição HTTP retornar o código 200 então este método retorna o
dicionário com os dados da resposta.
Se a requisição HTTP retornar um código diferente de 20... | [
"Cria",
"um",
"dicionário",
"com",
"os",
"dados",
"de",
"retorno",
"da",
"requisição",
"HTTP",
"ou",
"lança",
"uma",
"exceção",
"correspondente",
"ao",
"erro",
"ocorrido",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L85-L110 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Roteiro.py | Roteiro.inserir | def inserir(self, id_script_type, script, model, description):
"""Inserts a new Script and returns its identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param script: Script name. String with a minimum 3 and maximum of 40 characters
... | python | def inserir(self, id_script_type, script, model, description):
"""Inserts a new Script and returns its identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param script: Script name. String with a minimum 3 and maximum of 40 characters
... | [
"def",
"inserir",
"(",
"self",
",",
"id_script_type",
",",
"script",
",",
"model",
",",
"description",
")",
":",
"script_map",
"=",
"dict",
"(",
")",
"script_map",
"[",
"'id_script_type'",
"]",
"=",
"id_script_type",
"script_map",
"[",
"'script'",
"]",
"=",
... | Inserts a new Script and returns its identifier.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param script: Script name. String with a minimum 3 and maximum of 40 characters
:param description: Script description. String with a minimum 3 and maximu... | [
"Inserts",
"a",
"new",
"Script",
"and",
"returns",
"its",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L58-L85 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Roteiro.py | Roteiro.alterar | def alterar(self, id_script, id_script_type, script, description, model=None):
"""Change Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
... | python | def alterar(self, id_script, id_script_type, script, description, model=None):
"""Change Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
... | [
"def",
"alterar",
"(",
"self",
",",
"id_script",
",",
"id_script_type",
",",
"script",
",",
"description",
",",
"model",
"=",
"None",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_script",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identif... | Change Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:param script: Script name. String with a minimum 3 and maximum of 40 characters
... | [
"Change",
"Script",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L87-L117 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Roteiro.py | Roteiro.remover | def remover(self, id_script):
"""Remove Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script is null and invalid.
:raise RoteiroNaoExisteError: Scrip... | python | def remover(self, id_script):
"""Remove Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script is null and invalid.
:raise RoteiroNaoExisteError: Scrip... | [
"def",
"remover",
"(",
"self",
",",
"id_script",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_script",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Script is invalid or was not informed.'",
")",
"url",
"=",
"'script/'",
"+",
"str",
... | Remove Script from by the identifier.
:param id_script: Identifier of the Script. Integer value and greater than zero.
:return: None
:raise InvalidParameterError: The identifier of Script is null and invalid.
:raise RoteiroNaoExisteError: Script not registered.
:raise DataBase... | [
"Remove",
"Script",
"from",
"by",
"the",
"identifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L119-L139 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Roteiro.py | Roteiro.listar_por_tipo | def listar_por_tipo(self, id_script_type):
"""List all Script by Script Type.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘script’: [{‘id’: < id >,
‘tipo_rotei... | python | def listar_por_tipo(self, id_script_type):
"""List all Script by Script Type.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘script’: [{‘id’: < id >,
‘tipo_rotei... | [
"def",
"listar_por_tipo",
"(",
"self",
",",
"id_script_type",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_script_type",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Script Type is invalid or was not informed.'",
")",
"url",
"=",
"'script... | List all Script by Script Type.
:param id_script_type: Identifier of the Script Type. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{‘script’: [{‘id’: < id >,
‘tipo_roteiro': < id_tipo_roteiro >,
‘nome': < nome >... | [
"List",
"all",
"Script",
"by",
"Script",
"Type",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L141-L169 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Roteiro.py | Roteiro.listar_por_equipamento | def listar_por_equipamento(self, id_equipment):
"""List all Script related Equipment.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{script': [{‘id’: < id >,
‘nome’: ... | python | def listar_por_equipamento(self, id_equipment):
"""List all Script related Equipment.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{script': [{‘id’: < id >,
‘nome’: ... | [
"def",
"listar_por_equipamento",
"(",
"self",
",",
"id_equipment",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_equipment",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of Equipment is invalid or was not informed.'",
")",
"url",
"=",
"'scrip... | List all Script related Equipment.
:param id_equipment: Identifier of the Equipment. Integer value and greater than zero.
:return: Dictionary with the following structure:
::
{script': [{‘id’: < id >,
‘nome’: < nome >,
‘descricao’: < descricao >,
... | [
"List",
"all",
"Script",
"related",
"Equipment",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L171-L201 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/BlockRule.py | BlockRule.get_rule_by_id | def get_rule_by_id(self, rule_id):
"""Get rule by indentifier.
:param rule_id: Rule identifier
:return: Dictionary with the following structure:
::
{'rule': {'environment': < environment_id >,
'content': < content >,
'custom': < custom >,
... | python | def get_rule_by_id(self, rule_id):
"""Get rule by indentifier.
:param rule_id: Rule identifier
:return: Dictionary with the following structure:
::
{'rule': {'environment': < environment_id >,
'content': < content >,
'custom': < custom >,
... | [
"def",
"get_rule_by_id",
"(",
"self",
",",
"rule_id",
")",
":",
"url",
"=",
"\"rule/get_by_id/\"",
"+",
"str",
"(",
"rule_id",
")",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"None",
",",
"'GET'",
",",
"url",
")",
"return",
"self",
".",
"re... | Get rule by indentifier.
:param rule_id: Rule identifier
:return: Dictionary with the following structure:
::
{'rule': {'environment': < environment_id >,
'content': < content >,
'custom': < custom >,
'id': < id >,
'name': < name >}... | [
"Get",
"rule",
"by",
"indentifier",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/BlockRule.py#L36-L60 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.create_networks | def create_networks(self, ids, id_vlan):
"""Set column 'active = 1' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing
"""
network_map = dict()
network_map['ids'] = ids
network_map['id_vlan'] = id_vlan
c... | python | def create_networks(self, ids, id_vlan):
"""Set column 'active = 1' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing
"""
network_map = dict()
network_map['ids'] = ids
network_map['id_vlan'] = id_vlan
c... | [
"def",
"create_networks",
"(",
"self",
",",
"ids",
",",
"id_vlan",
")",
":",
"network_map",
"=",
"dict",
"(",
")",
"network_map",
"[",
"'ids'",
"]",
"=",
"ids",
"network_map",
"[",
"'id_vlan'",
"]",
"=",
"id_vlan",
"code",
",",
"xml",
"=",
"self",
".",... | Set column 'active = 1' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing | [
"Set",
"column",
"active",
"=",
"1",
"in",
"tables",
"redeipv4",
"and",
"redeipv6",
"]"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L38-L53 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.add_network | def add_network(self, network, id_vlan, id_network_type,
id_environment_vip=None, cluster_unit=None):
"""
Add new network
:param network: IPV4 or IPV6 (ex.: "10.0.0.3/24")
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_... | python | def add_network(self, network, id_vlan, id_network_type,
id_environment_vip=None, cluster_unit=None):
"""
Add new network
:param network: IPV4 or IPV6 (ex.: "10.0.0.3/24")
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_... | [
"def",
"add_network",
"(",
"self",
",",
"network",
",",
"id_vlan",
",",
"id_network_type",
",",
"id_environment_vip",
"=",
"None",
",",
"cluster_unit",
"=",
"None",
")",
":",
"network_map",
"=",
"dict",
"(",
")",
"network_map",
"[",
"'network'",
"]",
"=",
... | Add new network
:param network: IPV4 or IPV6 (ex.: "10.0.0.3/24")
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_network_type: Identifier of the NetworkType. Integer value and greater than zero.
:param id_environment_vip: Identifier of the Environ... | [
"Add",
"new",
"network"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L55-L96 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.edit_network | def edit_network(self, id_network, ip_type, id_net_type, id_env_vip=None, cluster_unit=None):
"""
Edit a network 4 or 6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:param id_net_type: Identifier of the NetworkType. Integer value and greater than ze... | python | def edit_network(self, id_network, ip_type, id_net_type, id_env_vip=None, cluster_unit=None):
"""
Edit a network 4 or 6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:param id_net_type: Identifier of the NetworkType. Integer value and greater than ze... | [
"def",
"edit_network",
"(",
"self",
",",
"id_network",
",",
"ip_type",
",",
"id_net_type",
",",
"id_env_vip",
"=",
"None",
",",
"cluster_unit",
"=",
"None",
")",
":",
"net_map",
"=",
"dict",
"(",
")",
"net_map",
"[",
"'id_network'",
"]",
"=",
"id_network",... | Edit a network 4 or 6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:param id_net_type: Identifier of the NetworkType. Integer value and greater than zero.
:param id_env_vip: Identifier of the Environment Vip. Integer value and greater than zero.
:pa... | [
"Edit",
"a",
"network",
"4",
"or",
"6"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L210-L237 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.get_network_ipv4 | def get_network_ipv4(self, id_network):
"""
Get networkipv4
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
... | python | def get_network_ipv4(self, id_network):
"""
Get networkipv4
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
... | [
"def",
"get_network_ipv4",
"(",
"self",
",",
"id_network",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O id do rede ip4 foi informado incorretamente.'",
")",
"url",
"=",
"'network/ipv4/id/'",
"+",
... | Get networkipv4
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
'ambiente_vip': < id_ambiente_vip >,
'vlan': <i... | [
"Get",
"networkipv4"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L239-L278 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.get_network_ipv6 | def get_network_ipv6(self, id_network):
"""
Get networkipv6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
... | python | def get_network_ipv6(self, id_network):
"""
Get networkipv6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
... | [
"def",
"get_network_ipv6",
"(",
"self",
",",
"id_network",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'O id do rede ip6 foi informado incorretamente.'",
")",
"url",
"=",
"'network/ipv6/id/'",
"+",
... | Get networkipv6
:param id_network: Identifier of the Network. Integer value and greater than zero.
:return: Following dictionary:
::
{'network': {'id': < id_networkIpv6 >,
'network_type': < id_tipo_rede >,
'ambiente_vip': < id_ambiente_viṕ >,
'vlan': <i... | [
"Get",
"networkipv6"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L280-L326 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.deallocate_network_ipv4 | def deallocate_network_ipv4(self, id_network_ipv4):
"""
Deallocate all relationships between NetworkIPv4.
:param id_network_ipv4: ID for NetworkIPv4
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv4.
:raise NetworkIPv4NotFoundError: NetworkIPv4 ... | python | def deallocate_network_ipv4(self, id_network_ipv4):
"""
Deallocate all relationships between NetworkIPv4.
:param id_network_ipv4: ID for NetworkIPv4
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv4.
:raise NetworkIPv4NotFoundError: NetworkIPv4 ... | [
"def",
"deallocate_network_ipv4",
"(",
"self",
",",
"id_network_ipv4",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network_ipv4",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of NetworkIPv4 is invalid or was not informed.'",
")",
"url",
"=",
... | Deallocate all relationships between NetworkIPv4.
:param id_network_ipv4: ID for NetworkIPv4
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv4.
:raise NetworkIPv4NotFoundError: NetworkIPv4 not found.
:raise DataBaseError: Networkapi failed to access the... | [
"Deallocate",
"all",
"relationships",
"between",
"NetworkIPv4",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L328-L350 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.add_network_ipv6 | def add_network_ipv6(
self,
id_vlan,
id_tipo_rede,
id_ambiente_vip=None,
prefix=None):
"""
Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of the ... | python | def add_network_ipv6(
self,
id_vlan,
id_tipo_rede,
id_ambiente_vip=None,
prefix=None):
"""
Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of the ... | [
"def",
"add_network_ipv6",
"(",
"self",
",",
"id_vlan",
",",
"id_tipo_rede",
",",
"id_ambiente_vip",
"=",
"None",
",",
"prefix",
"=",
"None",
")",
":",
"vlan_map",
"=",
"dict",
"(",
")",
"vlan_map",
"[",
"'id_vlan'",
"]",
"=",
"id_vlan",
"vlan_map",
"[",
... | Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero.
:param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero.
:para... | [
"Add",
"new",
"networkipv6"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L352-L415 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.add_network_ipv6_hosts | def add_network_ipv6_hosts(
self,
id_vlan,
id_tipo_rede,
num_hosts,
id_ambiente_vip=None):
"""
Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of ... | python | def add_network_ipv6_hosts(
self,
id_vlan,
id_tipo_rede,
num_hosts,
id_ambiente_vip=None):
"""
Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of ... | [
"def",
"add_network_ipv6_hosts",
"(",
"self",
",",
"id_vlan",
",",
"id_tipo_rede",
",",
"num_hosts",
",",
"id_ambiente_vip",
"=",
"None",
")",
":",
"vlan_map",
"=",
"dict",
"(",
")",
"vlan_map",
"[",
"'id_vlan'",
"]",
"=",
"id_vlan",
"vlan_map",
"[",
"'id_ti... | Add new networkipv6
:param id_vlan: Identifier of the Vlan. Integer value and greater than zero.
:param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero.
:param num_hosts: Number of hosts expected. Integer value and greater than zero.
:param id_ambiente_v... | [
"Add",
"new",
"networkipv6"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L417-L479 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.deallocate_network_ipv6 | def deallocate_network_ipv6(self, id_network_ipv6):
"""
Deallocate all relationships between NetworkIPv6.
:param id_network_ipv6: ID for NetworkIPv6
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv6.
:raise NetworkIPv6NotFoundError: NetworkIPv6 ... | python | def deallocate_network_ipv6(self, id_network_ipv6):
"""
Deallocate all relationships between NetworkIPv6.
:param id_network_ipv6: ID for NetworkIPv6
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv6.
:raise NetworkIPv6NotFoundError: NetworkIPv6 ... | [
"def",
"deallocate_network_ipv6",
"(",
"self",
",",
"id_network_ipv6",
")",
":",
"if",
"not",
"is_valid_int_param",
"(",
"id_network_ipv6",
")",
":",
"raise",
"InvalidParameterError",
"(",
"u'The identifier of NetworkIPv6 is invalid or was not informed.'",
")",
"url",
"=",
... | Deallocate all relationships between NetworkIPv6.
:param id_network_ipv6: ID for NetworkIPv6
:return: Nothing
:raise InvalidParameterError: Invalid ID for NetworkIPv6.
:raise NetworkIPv6NotFoundError: NetworkIPv6 not found.
:raise DataBaseError: Networkapi failed to access the... | [
"Deallocate",
"all",
"relationships",
"between",
"NetworkIPv6",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L481-L503 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | Network.remove_networks | def remove_networks(self, ids):
"""
Set column 'active = 0' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing
:raise NetworkInactiveError: Unable to remove the network because it is inactive.
:raise InvalidParameterErro... | python | def remove_networks(self, ids):
"""
Set column 'active = 0' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing
:raise NetworkInactiveError: Unable to remove the network because it is inactive.
:raise InvalidParameterErro... | [
"def",
"remove_networks",
"(",
"self",
",",
"ids",
")",
":",
"network_map",
"=",
"dict",
"(",
")",
"network_map",
"[",
"'ids'",
"]",
"=",
"ids",
"code",
",",
"xml",
"=",
"self",
".",
"submit",
"(",
"{",
"'network'",
":",
"network_map",
"}",
",",
"'PU... | Set column 'active = 0' in tables redeipv4 and redeipv6]
:param ids: ID for NetworkIPv4 and/or NetworkIPv6
:return: Nothing
:raise NetworkInactiveError: Unable to remove the network because it is inactive.
:raise InvalidParameterError: Invalid ID for Network or NetworkType.
:r... | [
"Set",
"column",
"active",
"=",
"0",
"in",
"tables",
"redeipv4",
"and",
"redeipv6",
"]"
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L505-L527 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | DHCPRelayIPv4.add | def add(self, networkipv4_id, ipv4_id):
"""List all DHCPRelayIPv4.
:param: networkipv4_id, ipv4_id
:return: Following dictionary:
{
"networkipv4": <networkipv4_id>,
"id": <id>,
"ipv4": {
"oct4": <oct4>,
"oct2": <oct2>,
... | python | def add(self, networkipv4_id, ipv4_id):
"""List all DHCPRelayIPv4.
:param: networkipv4_id, ipv4_id
:return: Following dictionary:
{
"networkipv4": <networkipv4_id>,
"id": <id>,
"ipv4": {
"oct4": <oct4>,
"oct2": <oct2>,
... | [
"def",
"add",
"(",
"self",
",",
"networkipv4_id",
",",
"ipv4_id",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'networkipv4'",
"]",
"=",
"networkipv4_id",
"data",
"[",
"'ipv4'",
"]",
"=",
"dict",
"(",
")",
"data",
"[",
"'ipv4'",
"]",
"[",
... | List all DHCPRelayIPv4.
:param: networkipv4_id, ipv4_id
:return: Following dictionary:
{
"networkipv4": <networkipv4_id>,
"id": <id>,
"ipv4": {
"oct4": <oct4>,
"oct2": <oct2>,
"oct3": <oct3>,
"oct1": <oct1>... | [
"List",
"all",
"DHCPRelayIPv4",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L541-L570 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | DHCPRelayIPv4.list | def list(self, networkipv4=None, ipv4=None):
"""List all DHCPRelayIPv4.
:param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id
ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id
:return: Following dictionary:
[
{
"n... | python | def list(self, networkipv4=None, ipv4=None):
"""List all DHCPRelayIPv4.
:param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id
ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id
:return: Following dictionary:
[
{
"n... | [
"def",
"list",
"(",
"self",
",",
"networkipv4",
"=",
"None",
",",
"ipv4",
"=",
"None",
")",
":",
"uri",
"=",
"'api/dhcprelayv4/?'",
"if",
"networkipv4",
":",
"uri",
"+=",
"'networkipv4=%s&'",
"%",
"networkipv4",
"if",
"ipv4",
":",
"uri",
"+=",
"'ipv4=%s'",... | List all DHCPRelayIPv4.
:param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id
ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id
:return: Following dictionary:
[
{
"networkipv4": <networkipv4_id>,
"id": <id>,
... | [
"List",
"all",
"DHCPRelayIPv4",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L598-L631 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | DHCPRelayIPv6.add | def add(self, networkipv6_id, ipv6_id):
"""List all DHCPRelayIPv4.
:param: Object DHCPRelayIPv4
:return: Following dictionary:
{
"networkipv6": <networkipv4_id>,
"id": <id>,
"ipv6": {
"block1": <block1>,
"block2": <block2>,
... | python | def add(self, networkipv6_id, ipv6_id):
"""List all DHCPRelayIPv4.
:param: Object DHCPRelayIPv4
:return: Following dictionary:
{
"networkipv6": <networkipv4_id>,
"id": <id>,
"ipv6": {
"block1": <block1>,
"block2": <block2>,
... | [
"def",
"add",
"(",
"self",
",",
"networkipv6_id",
",",
"ipv6_id",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'networkipv6'",
"]",
"=",
"networkipv6_id",
"data",
"[",
"'ipv6'",
"]",
"=",
"dict",
"(",
")",
"data",
"[",
"'ipv6'",
"]",
"[",
... | List all DHCPRelayIPv4.
:param: Object DHCPRelayIPv4
:return: Following dictionary:
{
"networkipv6": <networkipv4_id>,
"id": <id>,
"ipv6": {
"block1": <block1>,
"block2": <block2>,
"block3": <block3>,
"bloc... | [
"List",
"all",
"DHCPRelayIPv4",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L657-L690 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/Network.py | DHCPRelayIPv6.list | def list(self, networkipv6=None, ipv6=None):
"""List all DHCPRelayIPv6.
:param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id
ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id
:return: Following dictionary:
[
{
"n... | python | def list(self, networkipv6=None, ipv6=None):
"""List all DHCPRelayIPv6.
:param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id
ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id
:return: Following dictionary:
[
{
"n... | [
"def",
"list",
"(",
"self",
",",
"networkipv6",
"=",
"None",
",",
"ipv6",
"=",
"None",
")",
":",
"uri",
"=",
"'api/dhcprelayv6/?'",
"if",
"networkipv6",
":",
"uri",
"+=",
"'networkipv6=%s&'",
"%",
"networkipv6",
"if",
"ipv6",
":",
"uri",
"+=",
"'ipv6=%s'",... | List all DHCPRelayIPv6.
:param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id
ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id
:return: Following dictionary:
[
{
"networkipv6": <networkipv4_id>,
"id": <id>,
... | [
"List",
"all",
"DHCPRelayIPv6",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L722-L759 | train |
globocom/GloboNetworkAPI-client-python | networkapiclient/ApiIPv6.py | ApiIPv6.search | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | python | def search(self, **kwargs):
"""
Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:para... | [
"def",
"search",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"super",
"(",
"ApiIPv6",
",",
"self",
")",
".",
"get",
"(",
"self",
".",
"prepare_url",
"(",
"'api/v3/ipv6/'",
",",
"kwargs",
")",
")"
] | Method to search ipv6's based on extends search.
:param search: Dict containing QuerySets to find ipv6's.
:param include: Array containing fields to include on response.
:param exclude: Array containing fields to exclude on response.
:param fields: Array containing fields to override d... | [
"Method",
"to",
"search",
"ipv6",
"s",
"based",
"on",
"extends",
"search",
"."
] | cf34f913da48d9abbf750114f5d2ac4b2dde137d | https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L36-L49 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.