repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.validar
def validar(self, id_vlan): """Validates ACL - IPv4 of VLAN from its identifier. Assigns 1 to 'acl_valida'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. :r...
python
def validar(self, id_vlan): """Validates ACL - IPv4 of VLAN from its identifier. Assigns 1 to 'acl_valida'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. :r...
[ "def", "validar", "(", "self", ",", "id_vlan", ")", ":", "if", "not", "is_valid_int_param", "(", "id_vlan", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Vlan is invalid or was not informed.'", ")", "url", "=", "'vlan/'", "+", "str", "(", "...
Validates ACL - IPv4 of VLAN from its identifier. Assigns 1 to 'acl_valida'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. :raise VlanNaoExisteError: Vlan not regis...
[ "Validates", "ACL", "-", "IPv4", "of", "VLAN", "from", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L918-L941
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.validate_ipv6
def validate_ipv6(self, id_vlan): """Validates ACL - IPv6 of VLAN from its identifier. Assigns 1 to 'acl_valida_v6'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. ...
python
def validate_ipv6(self, id_vlan): """Validates ACL - IPv6 of VLAN from its identifier. Assigns 1 to 'acl_valida_v6'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. ...
[ "def", "validate_ipv6", "(", "self", ",", "id_vlan", ")", ":", "if", "not", "is_valid_int_param", "(", "id_vlan", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Vlan is invalid or was not informed.'", ")", "url", "=", "'vlan/'", "+", "str", "(...
Validates ACL - IPv6 of VLAN from its identifier. Assigns 1 to 'acl_valida_v6'. :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :return: None :raise InvalidParameterError: Vlan identifier is null and invalid. :raise VlanNaoExisteError: Vlan not re...
[ "Validates", "ACL", "-", "IPv6", "of", "VLAN", "from", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L943-L966
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.remove
def remove(self, id_vlan): """Remove a VLAN by your primary key. Execute script to remove VLAN :param id_vlan: ID for VLAN. :return: Following dictionary: :: {‘sucesso’: {‘codigo’: < codigo >, ‘descricao’: {'stdout':< stdout >, 'stderr':< stderr >}}} ...
python
def remove(self, id_vlan): """Remove a VLAN by your primary key. Execute script to remove VLAN :param id_vlan: ID for VLAN. :return: Following dictionary: :: {‘sucesso’: {‘codigo’: < codigo >, ‘descricao’: {'stdout':< stdout >, 'stderr':< stderr >}}} ...
[ "def", "remove", "(", "self", ",", "id_vlan", ")", ":", "if", "not", "is_valid_int_param", "(", "id_vlan", ")", ":", "raise", "InvalidParameterError", "(", "u'Parameter id_vlan is invalid. Value: '", "+", "id_vlan", ")", "url", "=", "'vlan/'", "+", "str", "(", ...
Remove a VLAN by your primary key. Execute script to remove VLAN :param id_vlan: ID for VLAN. :return: Following dictionary: :: {‘sucesso’: {‘codigo’: < codigo >, ‘descricao’: {'stdout':< stdout >, 'stderr':< stderr >}}} :raise InvalidParameterError: Iden...
[ "Remove", "a", "VLAN", "by", "your", "primary", "key", ".", "Execute", "script", "to", "remove", "VLAN" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L968-L996
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.deallocate
def deallocate(self, id_vlan): """Deallocate all relationships between Vlan. :param id_vlan: Identifier of the VLAN. Integer value and greater than zero. :return: None :raise InvalidParameterError: VLAN identifier is null and invalid. :raise VlanError: VLAN is active. ...
python
def deallocate(self, id_vlan): """Deallocate all relationships between Vlan. :param id_vlan: Identifier of the VLAN. Integer value and greater than zero. :return: None :raise InvalidParameterError: VLAN identifier is null and invalid. :raise VlanError: VLAN is active. ...
[ "def", "deallocate", "(", "self", ",", "id_vlan", ")", ":", "if", "not", "is_valid_int_param", "(", "id_vlan", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Vlan is invalid or was not informed.'", ")", "url", "=", "'vlan/'", "+", "str", "(", ...
Deallocate all relationships between Vlan. :param id_vlan: Identifier of the VLAN. Integer value and greater than zero. :return: None :raise InvalidParameterError: VLAN identifier is null and invalid. :raise VlanError: VLAN is active. :raise VlanNaoExisteError: VLAN not found....
[ "Deallocate", "all", "relationships", "between", "Vlan", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L998-L1020
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.allocate_IPv6
def allocate_IPv6( self, name, id_network_type, id_environment, description, id_environment_vip=None): """Inserts a new VLAN. :param name: Name of Vlan. String with a maximum of 50 characters. :param id_network_type: Identi...
python
def allocate_IPv6( self, name, id_network_type, id_environment, description, id_environment_vip=None): """Inserts a new VLAN. :param name: Name of Vlan. String with a maximum of 50 characters. :param id_network_type: Identi...
[ "def", "allocate_IPv6", "(", "self", ",", "name", ",", "id_network_type", ",", "id_environment", ",", "description", ",", "id_environment_vip", "=", "None", ")", ":", "vlan_map", "=", "dict", "(", ")", "vlan_map", "[", "'name'", "]", "=", "name", "vlan_map",...
Inserts a new VLAN. :param name: Name of Vlan. String with a maximum of 50 characters. :param id_network_type: Identifier of the Netwok Type. Integer value and greater than zero. :param id_environment: Identifier of the Environment. Integer value and greater than zero. :param descriptio...
[ "Inserts", "a", "new", "VLAN", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L1022-L1091
globocom/GloboNetworkAPI-client-python
networkapiclient/Vlan.py
Vlan.create_script_acl
def create_script_acl(self, id_vlan, network_type): '''Generate the script acl :param id_vlan: Vlan Id :param network_type: v4 or v6 :raise InvalidValueError: Attrs invalids. :raise XMLError: Networkapi failed to generate the XML response. :raise VlanACLDuplicatedError:...
python
def create_script_acl(self, id_vlan, network_type): '''Generate the script acl :param id_vlan: Vlan Id :param network_type: v4 or v6 :raise InvalidValueError: Attrs invalids. :raise XMLError: Networkapi failed to generate the XML response. :raise VlanACLDuplicatedError:...
[ "def", "create_script_acl", "(", "self", ",", "id_vlan", ",", "network_type", ")", ":", "vlan_map", "=", "dict", "(", ")", "vlan_map", "[", "'id_vlan'", "]", "=", "id_vlan", "vlan_map", "[", "'network_type'", "]", "=", "network_type", "url", "=", "'vlan/crea...
Generate the script acl :param id_vlan: Vlan Id :param network_type: v4 or v6 :raise InvalidValueError: Attrs invalids. :raise XMLError: Networkapi failed to generate the XML response. :raise VlanACLDuplicatedError: ACL name duplicate. :raise VlanNotFoundError: Vlan not...
[ "Generate", "the", "script", "acl" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vlan.py#L1132-L1171
globocom/GloboNetworkAPI-client-python
networkapiclient/UsuarioGrupo.py
UsuarioGrupo.inserir
def inserir(self, id_user, id_group): """Create a relationship between User and Group. :param id_user: Identifier of the User. Integer value and greater than zero. :param id_group: Identifier of the Group. Integer value and greater than zero. :return: Dictionary with the following stru...
python
def inserir(self, id_user, id_group): """Create a relationship between User and Group. :param id_user: Identifier of the User. Integer value and greater than zero. :param id_group: Identifier of the Group. Integer value and greater than zero. :return: Dictionary with the following stru...
[ "def", "inserir", "(", "self", ",", "id_user", ",", "id_group", ")", ":", "if", "not", "is_valid_int_param", "(", "id_user", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of User is invalid or was not informed.'", ")", "if", "not", "is_valid_int_p...
Create a relationship between User and Group. :param id_user: Identifier of the User. Integer value and greater than zero. :param id_group: Identifier of the Group. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'user_group': {'i...
[ "Create", "a", "relationship", "between", "User", "and", "Group", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/UsuarioGrupo.py#L38-L67
globocom/GloboNetworkAPI-client-python
networkapiclient/xml_utils.py
dumps
def dumps(map, root_name, root_attributes=None): """Cria um string no formato XML a partir dos elementos do map. Os elementos do mapa serão nós filhos do root_name. Cada chave do map será um Nó no XML. E o valor da chave será o conteúdo do Nó. Exemplos: :: - Mapa: {'networkapi':1} ...
python
def dumps(map, root_name, root_attributes=None): """Cria um string no formato XML a partir dos elementos do map. Os elementos do mapa serão nós filhos do root_name. Cada chave do map será um Nó no XML. E o valor da chave será o conteúdo do Nó. Exemplos: :: - Mapa: {'networkapi':1} ...
[ "def", "dumps", "(", "map", ",", "root_name", ",", "root_attributes", "=", "None", ")", ":", "xml", "=", "''", "try", ":", "implementation", "=", "getDOMImplementation", "(", ")", "except", "ImportError", "as", "i", ":", "raise", "XMLErrorUtils", "(", "i",...
Cria um string no formato XML a partir dos elementos do map. Os elementos do mapa serão nós filhos do root_name. Cada chave do map será um Nó no XML. E o valor da chave será o conteúdo do Nó. Exemplos: :: - Mapa: {'networkapi':1} XML: &lt;?xml version="1.0" encoding="UTF-8"?&gt;&l...
[ "Cria", "um", "string", "no", "formato", "XML", "a", "partir", "dos", "elementos", "do", "map", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/xml_utils.py#L106-L191
globocom/GloboNetworkAPI-client-python
networkapiclient/xml_utils.py
loads
def loads(xml, force_list=None): """Cria um dicionário com os dados do XML. O dicionário terá como chave o nome do nó root e como valor o conteúdo do nó root. Quando o conteúdo de um nó é uma lista de nós então o valor do nó será um dicionário com uma chave para cada nó. Entretanto, se existir nós,...
python
def loads(xml, force_list=None): """Cria um dicionário com os dados do XML. O dicionário terá como chave o nome do nó root e como valor o conteúdo do nó root. Quando o conteúdo de um nó é uma lista de nós então o valor do nó será um dicionário com uma chave para cada nó. Entretanto, se existir nós,...
[ "def", "loads", "(", "xml", ",", "force_list", "=", "None", ")", ":", "if", "force_list", "is", "None", ":", "force_list", "=", "[", "]", "try", ":", "xml", "=", "remove_illegal_characters", "(", "xml", ")", "doc", "=", "parseString", "(", "xml", ")", ...
Cria um dicionário com os dados do XML. O dicionário terá como chave o nome do nó root e como valor o conteúdo do nó root. Quando o conteúdo de um nó é uma lista de nós então o valor do nó será um dicionário com uma chave para cada nó. Entretanto, se existir nós, de um mesmo pai, com o mesmo nome, entã...
[ "Cria", "um", "dicionário", "com", "os", "dados", "do", "XML", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/xml_utils.py#L261-L330
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiOptionVip.py
ApiOptionVip.option_vip_by_environment_vip_type
def option_vip_by_environment_vip_type(self, environment_vip_id, type_option): """ List option vip. param environment_vip_id: Id of Environment Vip Param type_option: type option vip """ uri = "api/v3/option-vip/environment-vip/%s/type-option/%s/" % (environment_vip_id, ...
python
def option_vip_by_environment_vip_type(self, environment_vip_id, type_option): """ List option vip. param environment_vip_id: Id of Environment Vip Param type_option: type option vip """ uri = "api/v3/option-vip/environment-vip/%s/type-option/%s/" % (environment_vip_id, ...
[ "def", "option_vip_by_environment_vip_type", "(", "self", ",", "environment_vip_id", ",", "type_option", ")", ":", "uri", "=", "\"api/v3/option-vip/environment-vip/%s/type-option/%s/\"", "%", "(", "environment_vip_id", ",", "type_option", ")", "return", "self", ".", "get"...
List option vip. param environment_vip_id: Id of Environment Vip Param type_option: type option vip
[ "List", "option", "vip", ".", "param", "environment_vip_id", ":", "Id", "of", "Environment", "Vip", "Param", "type_option", ":", "type", "option", "vip" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiOptionVip.py#L36-L45
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4Neighbor.py
ApiV4Neighbor.search
def search(self, **kwargs): """ Method to search neighbors based on extends search. :param search: Dict containing QuerySets to find neighbors. :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 neighbors based on extends search. :param search: Dict containing QuerySets to find neighbors. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. ...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiV4Neighbor", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v4/neighbor/'", ",", "kwargs", ")", ")" ]
Method to search neighbors based on extends search. :param search: Dict containing QuerySets to find neighbors. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to over...
[ "Method", "to", "search", "neighbors", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Neighbor.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4Neighbor.py
ApiV4Neighbor.delete
def delete(self, ids): """ Method to delete neighbors by their id's :param ids: Identifiers of neighbors :return: None """ url = build_uri_with_ids('api/v4/neighbor/%s/', ids) return super(ApiV4Neighbor, self).delete(url)
python
def delete(self, ids): """ Method to delete neighbors by their id's :param ids: Identifiers of neighbors :return: None """ url = build_uri_with_ids('api/v4/neighbor/%s/', ids) return super(ApiV4Neighbor, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v4/neighbor/%s/'", ",", "ids", ")", "return", "super", "(", "ApiV4Neighbor", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete neighbors by their id's :param ids: Identifiers of neighbors :return: None
[ "Method", "to", "delete", "neighbors", "by", "their", "id", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Neighbor.py#L65-L73
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4Neighbor.py
ApiV4Neighbor.update
def update(self, neighbors): """ Method to update neighbors :param neighbors: List containing neighbors desired to updated :return: None """ data = {'neighbors': neighbors} neighbors_ids = [str(env.get('id')) for env in neighbors] return super(ApiV4Neig...
python
def update(self, neighbors): """ Method to update neighbors :param neighbors: List containing neighbors desired to updated :return: None """ data = {'neighbors': neighbors} neighbors_ids = [str(env.get('id')) for env in neighbors] return super(ApiV4Neig...
[ "def", "update", "(", "self", ",", "neighbors", ")", ":", "data", "=", "{", "'neighbors'", ":", "neighbors", "}", "neighbors_ids", "=", "[", "str", "(", "env", ".", "get", "(", "'id'", ")", ")", "for", "env", "in", "neighbors", "]", "return", "super"...
Method to update neighbors :param neighbors: List containing neighbors desired to updated :return: None
[ "Method", "to", "update", "neighbors" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Neighbor.py#L75-L87
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4Neighbor.py
ApiV4Neighbor.create
def create(self, neighbors): """ Method to create neighbors :param neighbors: List containing neighbors desired to be created on database :return: None """ data = {'neighbors': neighbors} return super(ApiV4Neighbor, self).post('api/v4/neighbor/', data)
python
def create(self, neighbors): """ Method to create neighbors :param neighbors: List containing neighbors desired to be created on database :return: None """ data = {'neighbors': neighbors} return super(ApiV4Neighbor, self).post('api/v4/neighbor/', data)
[ "def", "create", "(", "self", ",", "neighbors", ")", ":", "data", "=", "{", "'neighbors'", ":", "neighbors", "}", "return", "super", "(", "ApiV4Neighbor", ",", "self", ")", ".", "post", "(", "'api/v4/neighbor/'", ",", "data", ")" ]
Method to create neighbors :param neighbors: List containing neighbors desired to be created on database :return: None
[ "Method", "to", "create", "neighbors" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Neighbor.py#L89-L98
globocom/GloboNetworkAPI-client-python
networkapiclient/EspecificacaoGrupoVirtual.py
EspecificacaoGrupoVirtual.add_equipamento
def add_equipamento( self, id_tipo_equipamento, id_modelo, prefixo, id_grupo, id_vlan, descricao_vlan): """Adiciona um equipamento na lista de equipamentos para operação de inserir/alterar um grupo virtual. :param id_ti...
python
def add_equipamento( self, id_tipo_equipamento, id_modelo, prefixo, id_grupo, id_vlan, descricao_vlan): """Adiciona um equipamento na lista de equipamentos para operação de inserir/alterar um grupo virtual. :param id_ti...
[ "def", "add_equipamento", "(", "self", ",", "id_tipo_equipamento", ",", "id_modelo", ",", "prefixo", ",", "id_grupo", ",", "id_vlan", ",", "descricao_vlan", ")", ":", "equipamento_map", "=", "dict", "(", ")", "equipamento_map", "[", "'id_tipo_equipamento'", "]", ...
Adiciona um equipamento na lista de equipamentos para operação de inserir/alterar um grupo virtual. :param id_tipo_equipamento: Identificador do tipo de equipamento. :param id_modelo: Identificador do modelo do equipamento. :param prefixo: Prefixo do nome do equipamento. :param id_grupo...
[ "Adiciona", "um", "equipamento", "na", "lista", "de", "equipamentos", "para", "operação", "de", "inserir", "/", "alterar", "um", "grupo", "virtual", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EspecificacaoGrupoVirtual.py#L32-L62
globocom/GloboNetworkAPI-client-python
networkapiclient/EspecificacaoGrupoVirtual.py
EspecificacaoGrupoVirtual.add_equipamento_remove
def add_equipamento_remove(self, id, id_ip, ids_ips_vips): '''Adiciona um equipamento na lista de equipamentos para operação de remover um grupo virtual. :param id: Identificador do equipamento. :param id_ip: Identificador do IP do equipamento. :param ids_ips_vips: Lista com os identifi...
python
def add_equipamento_remove(self, id, id_ip, ids_ips_vips): '''Adiciona um equipamento na lista de equipamentos para operação de remover um grupo virtual. :param id: Identificador do equipamento. :param id_ip: Identificador do IP do equipamento. :param ids_ips_vips: Lista com os identifi...
[ "def", "add_equipamento_remove", "(", "self", ",", "id", ",", "id_ip", ",", "ids_ips_vips", ")", ":", "equipament_map", "=", "dict", "(", ")", "equipament_map", "[", "'id'", "]", "=", "id", "equipament_map", "[", "'id_ip'", "]", "=", "id_ip", "equipament_map...
Adiciona um equipamento na lista de equipamentos para operação de remover um grupo virtual. :param id: Identificador do equipamento. :param id_ip: Identificador do IP do equipamento. :param ids_ips_vips: Lista com os identificadores de IPs criados para cada VIP e associados ao equip...
[ "Adiciona", "um", "equipamento", "na", "lista", "de", "equipamentos", "para", "operação", "de", "remover", "um", "grupo", "virtual", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EspecificacaoGrupoVirtual.py#L64-L79
globocom/GloboNetworkAPI-client-python
networkapiclient/EspecificacaoGrupoVirtual.py
EspecificacaoGrupoVirtual.add_vip
def add_vip( self, id, real_name_sufixo, id_vlan, descricao_vlan, id_vlan_real, descricao_vlan_real, balanceadores, id_healthcheck_expect, finalidade, cliente, ambiente, ...
python
def add_vip( self, id, real_name_sufixo, id_vlan, descricao_vlan, id_vlan_real, descricao_vlan_real, balanceadores, id_healthcheck_expect, finalidade, cliente, ambiente, ...
[ "def", "add_vip", "(", "self", ",", "id", ",", "real_name_sufixo", ",", "id_vlan", ",", "descricao_vlan", ",", "id_vlan_real", ",", "descricao_vlan_real", ",", "balanceadores", ",", "id_healthcheck_expect", ",", "finalidade", ",", "cliente", ",", "ambiente", ",", ...
Adiciona um VIP na lista de VIPs para operação de inserir/alterar um grupo virtual. Os parâmetros abaixo somente são necessários para a operação de alteração: - 'real_maps': Deverá conter os reals atualmente criados para a requisição de VIP. - 'id_requisicao_vip': O identificador da re...
[ "Adiciona", "um", "VIP", "na", "lista", "de", "VIPs", "para", "operação", "de", "inserir", "/", "alterar", "um", "grupo", "virtual", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EspecificacaoGrupoVirtual.py#L81-L207
globocom/GloboNetworkAPI-client-python
networkapiclient/EspecificacaoGrupoVirtual.py
EspecificacaoGrupoVirtual.add_vip_remove
def add_vip_remove(self, id_ip, id_equipamentos): '''Adiciona um VIP na lista de VIPs para operação de remover um grupo virtual. :param id_ip: Identificador do IP criado para o VIP. :param id_equipamentos: Lista com os identificadores dos balanceadores associados ao IP do VIP. :return:...
python
def add_vip_remove(self, id_ip, id_equipamentos): '''Adiciona um VIP na lista de VIPs para operação de remover um grupo virtual. :param id_ip: Identificador do IP criado para o VIP. :param id_equipamentos: Lista com os identificadores dos balanceadores associados ao IP do VIP. :return:...
[ "def", "add_vip_remove", "(", "self", ",", "id_ip", ",", "id_equipamentos", ")", ":", "vip_map", "=", "dict", "(", ")", "vip_map", "[", "'id_ip'", "]", "=", "id_ip", "vip_map", "[", "'balanceadores'", "]", "=", "{", "'id_equipamento'", ":", "id_equipamentos"...
Adiciona um VIP na lista de VIPs para operação de remover um grupo virtual. :param id_ip: Identificador do IP criado para o VIP. :param id_equipamentos: Lista com os identificadores dos balanceadores associados ao IP do VIP. :return: None
[ "Adiciona", "um", "VIP", "na", "lista", "de", "VIPs", "para", "operação", "de", "remover", "um", "grupo", "virtual", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EspecificacaoGrupoVirtual.py#L209-L221
globocom/GloboNetworkAPI-client-python
networkapiclient/EspecificacaoGrupoVirtual.py
EspecificacaoGrupoVirtual.add_vip_incremento
def add_vip_incremento(self, id): """Adiciona um vip à especificação do grupo virtual. :param id: Identificador de referencia do VIP. """ vip_map = dict() vip_map['id'] = id self.lista_vip.append(vip_map)
python
def add_vip_incremento(self, id): """Adiciona um vip à especificação do grupo virtual. :param id: Identificador de referencia do VIP. """ vip_map = dict() vip_map['id'] = id self.lista_vip.append(vip_map)
[ "def", "add_vip_incremento", "(", "self", ",", "id", ")", ":", "vip_map", "=", "dict", "(", ")", "vip_map", "[", "'id'", "]", "=", "id", "self", ".", "lista_vip", ".", "append", "(", "vip_map", ")" ]
Adiciona um vip à especificação do grupo virtual. :param id: Identificador de referencia do VIP.
[ "Adiciona", "um", "vip", "à", "especificação", "do", "grupo", "virtual", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EspecificacaoGrupoVirtual.py#L223-L232
globocom/GloboNetworkAPI-client-python
networkapiclient/EquipamentoAcesso.py
EquipamentoAcesso.get_access
def get_access(self, id_access): """Get Equipment Access by id. :return: Dictionary with following: :: {'equipamento_acesso': {'id_equipamento': < id_equipamento >, 'fqdn': < fqdn >, 'user': < user >, 'pass': < pass >, 'i...
python
def get_access(self, id_access): """Get Equipment Access by id. :return: Dictionary with following: :: {'equipamento_acesso': {'id_equipamento': < id_equipamento >, 'fqdn': < fqdn >, 'user': < user >, 'pass': < pass >, 'i...
[ "def", "get_access", "(", "self", ",", "id_access", ")", ":", "if", "not", "is_valid_int_param", "(", "id_access", ")", ":", "raise", "InvalidParameterError", "(", "u'Equipment Access ID is invalid.'", ")", "url", "=", "'equipamentoacesso/id/'", "+", "str", "(", "...
Get Equipment Access by id. :return: Dictionary with following: :: {'equipamento_acesso': {'id_equipamento': < id_equipamento >, 'fqdn': < fqdn >, 'user': < user >, 'pass': < pass >, 'id_tipo_acesso': < id_tipo_acesso >, ...
[ "Get", "Equipment", "Access", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L38-L61
globocom/GloboNetworkAPI-client-python
networkapiclient/EquipamentoAcesso.py
EquipamentoAcesso.list_by_equip
def list_by_equip(self, name): """ List all equipment access by equipment name :return: Dictionary with the following structure: :: {‘equipamento_acesso’:[ {'id': <id_equiptos_access>, 'equipamento': <id_equip>, 'fqdn': <fqdn>, 'user': <...
python
def list_by_equip(self, name): """ List all equipment access by equipment name :return: Dictionary with the following structure: :: {‘equipamento_acesso’:[ {'id': <id_equiptos_access>, 'equipamento': <id_equip>, 'fqdn': <fqdn>, 'user': <...
[ "def", "list_by_equip", "(", "self", ",", "name", ")", ":", "equip_access_map", "=", "dict", "(", ")", "equip_access_map", "[", "'name'", "]", "=", "name", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "\"equipamento_acesso\"", ":", "equip_acce...
List all equipment access by equipment name :return: Dictionary with the following structure: :: {‘equipamento_acesso’:[ {'id': <id_equiptos_access>, 'equipamento': <id_equip>, 'fqdn': <fqdn>, 'user': <user>, 'password': <pass> '...
[ "List", "all", "equipment", "access", "by", "equipment", "name" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L92-L120
globocom/GloboNetworkAPI-client-python
networkapiclient/EquipamentoAcesso.py
EquipamentoAcesso.inserir
def inserir( self, id_equipamento, fqdn, user, password, id_tipo_acesso, enable_pass): """Add new relationship between equipment and access type and returns its id. :param id_equipamento: Equipment identifier. :...
python
def inserir( self, id_equipamento, fqdn, user, password, id_tipo_acesso, enable_pass): """Add new relationship between equipment and access type and returns its id. :param id_equipamento: Equipment identifier. :...
[ "def", "inserir", "(", "self", ",", "id_equipamento", ",", "fqdn", ",", "user", ",", "password", ",", "id_tipo_acesso", ",", "enable_pass", ")", ":", "equipamento_acesso_map", "=", "dict", "(", ")", "equipamento_acesso_map", "[", "'id_equipamento'", "]", "=", ...
Add new relationship between equipment and access type and returns its id. :param id_equipamento: Equipment identifier. :param fqdn: Equipment FQDN. :param user: User. :param password: Password. :param id_tipo_acesso: Access Type identifier. :param enable_pass: Enable ac...
[ "Add", "new", "relationship", "between", "equipment", "and", "access", "type", "and", "returns", "its", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L122-L160
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L162-L206
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAcesso.py#L208-L234
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L37-L48
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L50-L57
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L59-L88
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L90-L119
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L322-L340
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L342-L361
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L363-L382
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Pool.py#L384-L403
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L64-L97
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L99-L133
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L135-L168
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L170-L209
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L211-L243
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/DireitoGrupoEquipamento.py#L245-L265
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L36-L49
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L65-L73
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L75-L87
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermission.py#L89-L98
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoRoteiro.py#L105-L131
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L36-L49
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L66-L75
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L77-L89
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVrf.py#L91-L100
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoEquipamento.py#L55-L79
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L38-L66
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L68-L97
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EquipamentoAmbiente.py#L99-L132
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L56-L61
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L63-L69
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L71-L80
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L82-L89
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L91-L99
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L115-L124
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L140-L148
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L161-L172
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L174-L183
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L187-L195
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiInterface.py#L197-L205
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L58-L80
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L82-L108
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoL3.py#L110-L131
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L78-L117
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L235-L294
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L296-L311
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L313-L328
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L330-L343
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L345-L362
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L371-L376
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/rest.py#L400-L423
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L36-L49
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L65-L73
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L75-L87
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4VirtualInterface.py#L89-L99
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L38-L68
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L93-L119
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L121-L155
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoUsuario.py#L157-L177
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L45-L52
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L54-L65
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L67-L80
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L82-L90
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L92-L105
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L121-L129
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L131-L143
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEnvironment.py#L145-L154
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L36-L49
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L65-L73
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L75-L87
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4As.py#L89-L98
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...
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/EventLog.py#L40-L106
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Equipment.py#L36-L49
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Equipment.py#L65-L73
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Equipment.py#L75-L87
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" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4Equipment.py#L89-L98
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L47-L68
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", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L70-L83