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/GenericClient.py
GenericClient.response
def response(self, code, xml, force_list=None): """Cria um dicionário com os dados de retorno da requisição HTTP ou lança uma exceção correspondente ao erro ocorrido. Se a requisição HTTP retornar o código 200 então este método retorna o dicionário com os dados da resposta. ...
python
def response(self, code, xml, force_list=None): """Cria um dicionário com os dados de retorno da requisição HTTP ou lança uma exceção correspondente ao erro ocorrido. Se a requisição HTTP retornar o código 200 então este método retorna o dicionário com os dados da resposta. ...
[ "def", "response", "(", "self", ",", "code", ",", "xml", ",", "force_list", "=", "None", ")", ":", "if", "int", "(", "code", ")", "==", "200", ":", "# Retorna o map", "return", "loads", "(", "xml", ",", "force_list", ")", "[", "'networkapi'", "]", "e...
Cria um dicionário com os dados de retorno da requisição HTTP ou lança uma exceção correspondente ao erro ocorrido. Se a requisição HTTP retornar o código 200 então este método retorna o dicionário com os dados da resposta. Se a requisição HTTP retornar um código diferente de 20...
[ "Cria", "um", "dicionário", "com", "os", "dados", "de", "retorno", "da", "requisição", "HTTP", "ou", "lança", "uma", "exceção", "correspondente", "ao", "erro", "ocorrido", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GenericClient.py#L85-L110
globocom/GloboNetworkAPI-client-python
networkapiclient/Roteiro.py
Roteiro.inserir
def inserir(self, id_script_type, script, model, description): """Inserts a new Script and returns its identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters ...
python
def inserir(self, id_script_type, script, model, description): """Inserts a new Script and returns its identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters ...
[ "def", "inserir", "(", "self", ",", "id_script_type", ",", "script", ",", "model", ",", "description", ")", ":", "script_map", "=", "dict", "(", ")", "script_map", "[", "'id_script_type'", "]", "=", "id_script_type", "script_map", "[", "'script'", "]", "=", ...
Inserts a new Script and returns its identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters :param description: Script description. String with a minimum 3 and maximu...
[ "Inserts", "a", "new", "Script", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L58-L85
globocom/GloboNetworkAPI-client-python
networkapiclient/Roteiro.py
Roteiro.alterar
def alterar(self, id_script, id_script_type, script, description, model=None): """Change Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. ...
python
def alterar(self, id_script, id_script_type, script, description, model=None): """Change Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. ...
[ "def", "alterar", "(", "self", ",", "id_script", ",", "id_script_type", ",", "script", ",", "description", ",", "model", "=", "None", ")", ":", "if", "not", "is_valid_int_param", "(", "id_script", ")", ":", "raise", "InvalidParameterError", "(", "u'The identif...
Change Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters ...
[ "Change", "Script", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L87-L117
globocom/GloboNetworkAPI-client-python
networkapiclient/Roteiro.py
Roteiro.remover
def remover(self, id_script): """Remove Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script is null and invalid. :raise RoteiroNaoExisteError: Scrip...
python
def remover(self, id_script): """Remove Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script is null and invalid. :raise RoteiroNaoExisteError: Scrip...
[ "def", "remover", "(", "self", ",", "id_script", ")", ":", "if", "not", "is_valid_int_param", "(", "id_script", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Script is invalid or was not informed.'", ")", "url", "=", "'script/'", "+", "str", ...
Remove Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script is null and invalid. :raise RoteiroNaoExisteError: Script not registered. :raise DataBase...
[ "Remove", "Script", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L119-L139
globocom/GloboNetworkAPI-client-python
networkapiclient/Roteiro.py
Roteiro.listar_por_tipo
def listar_por_tipo(self, id_script_type): """List all Script by Script Type. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘script’: [{‘id’: < id >, ‘tipo_rotei...
python
def listar_por_tipo(self, id_script_type): """List all Script by Script Type. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘script’: [{‘id’: < id >, ‘tipo_rotei...
[ "def", "listar_por_tipo", "(", "self", ",", "id_script_type", ")", ":", "if", "not", "is_valid_int_param", "(", "id_script_type", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Script Type is invalid or was not informed.'", ")", "url", "=", "'script...
List all Script by Script Type. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘script’: [{‘id’: < id >, ‘tipo_roteiro': < id_tipo_roteiro >, ‘nome': < nome >...
[ "List", "all", "Script", "by", "Script", "Type", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L141-L169
globocom/GloboNetworkAPI-client-python
networkapiclient/Roteiro.py
Roteiro.listar_por_equipamento
def listar_por_equipamento(self, id_equipment): """List all Script related Equipment. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {script': [{‘id’: < id >, ‘nome’: ...
python
def listar_por_equipamento(self, id_equipment): """List all Script related Equipment. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {script': [{‘id’: < id >, ‘nome’: ...
[ "def", "listar_por_equipamento", "(", "self", ",", "id_equipment", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipment", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Equipment is invalid or was not informed.'", ")", "url", "=", "'scrip...
List all Script related Equipment. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {script': [{‘id’: < id >, ‘nome’: < nome >, ‘descricao’: < descricao >, ...
[ "List", "all", "Script", "related", "Equipment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Roteiro.py#L171-L201
globocom/GloboNetworkAPI-client-python
networkapiclient/BlockRule.py
BlockRule.get_rule_by_id
def get_rule_by_id(self, rule_id): """Get rule by indentifier. :param rule_id: Rule identifier :return: Dictionary with the following structure: :: {'rule': {'environment': < environment_id >, 'content': < content >, 'custom': < custom >, ...
python
def get_rule_by_id(self, rule_id): """Get rule by indentifier. :param rule_id: Rule identifier :return: Dictionary with the following structure: :: {'rule': {'environment': < environment_id >, 'content': < content >, 'custom': < custom >, ...
[ "def", "get_rule_by_id", "(", "self", ",", "rule_id", ")", ":", "url", "=", "\"rule/get_by_id/\"", "+", "str", "(", "rule_id", ")", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "re...
Get rule by indentifier. :param rule_id: Rule identifier :return: Dictionary with the following structure: :: {'rule': {'environment': < environment_id >, 'content': < content >, 'custom': < custom >, 'id': < id >, 'name': < name >}...
[ "Get", "rule", "by", "indentifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/BlockRule.py#L36-L60
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.create_networks
def create_networks(self, ids, id_vlan): """Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing """ network_map = dict() network_map['ids'] = ids network_map['id_vlan'] = id_vlan c...
python
def create_networks(self, ids, id_vlan): """Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing """ network_map = dict() network_map['ids'] = ids network_map['id_vlan'] = id_vlan c...
[ "def", "create_networks", "(", "self", ",", "ids", ",", "id_vlan", ")", ":", "network_map", "=", "dict", "(", ")", "network_map", "[", "'ids'", "]", "=", "ids", "network_map", "[", "'id_vlan'", "]", "=", "id_vlan", "code", ",", "xml", "=", "self", ".",...
Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing
[ "Set", "column", "active", "=", "1", "in", "tables", "redeipv4", "and", "redeipv6", "]" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L38-L53
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.add_network
def add_network(self, network, id_vlan, id_network_type, id_environment_vip=None, cluster_unit=None): """ Add new network :param network: IPV4 or IPV6 (ex.: "10.0.0.3/24") :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_...
python
def add_network(self, network, id_vlan, id_network_type, id_environment_vip=None, cluster_unit=None): """ Add new network :param network: IPV4 or IPV6 (ex.: "10.0.0.3/24") :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_...
[ "def", "add_network", "(", "self", ",", "network", ",", "id_vlan", ",", "id_network_type", ",", "id_environment_vip", "=", "None", ",", "cluster_unit", "=", "None", ")", ":", "network_map", "=", "dict", "(", ")", "network_map", "[", "'network'", "]", "=", ...
Add new network :param network: IPV4 or IPV6 (ex.: "10.0.0.3/24") :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_network_type: Identifier of the NetworkType. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environ...
[ "Add", "new", "network" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L55-L96
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.edit_network
def edit_network(self, id_network, ip_type, id_net_type, id_env_vip=None, cluster_unit=None): """ Edit a network 4 or 6 :param id_network: Identifier of the Network. Integer value and greater than zero. :param id_net_type: Identifier of the NetworkType. Integer value and greater than ze...
python
def edit_network(self, id_network, ip_type, id_net_type, id_env_vip=None, cluster_unit=None): """ Edit a network 4 or 6 :param id_network: Identifier of the Network. Integer value and greater than zero. :param id_net_type: Identifier of the NetworkType. Integer value and greater than ze...
[ "def", "edit_network", "(", "self", ",", "id_network", ",", "ip_type", ",", "id_net_type", ",", "id_env_vip", "=", "None", ",", "cluster_unit", "=", "None", ")", ":", "net_map", "=", "dict", "(", ")", "net_map", "[", "'id_network'", "]", "=", "id_network",...
Edit a network 4 or 6 :param id_network: Identifier of the Network. Integer value and greater than zero. :param id_net_type: Identifier of the NetworkType. Integer value and greater than zero. :param id_env_vip: Identifier of the Environment Vip. Integer value and greater than zero. :pa...
[ "Edit", "a", "network", "4", "or", "6" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L210-L237
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.get_network_ipv4
def get_network_ipv4(self, id_network): """ Get networkipv4 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
python
def get_network_ipv4(self, id_network): """ Get networkipv4 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
[ "def", "get_network_ipv4", "(", "self", ",", "id_network", ")", ":", "if", "not", "is_valid_int_param", "(", "id_network", ")", ":", "raise", "InvalidParameterError", "(", "u'O id do rede ip4 foi informado incorretamente.'", ")", "url", "=", "'network/ipv4/id/'", "+", ...
Get networkipv4 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, 'ambiente_vip': < id_ambiente_vip >, 'vlan': <i...
[ "Get", "networkipv4" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L239-L278
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.get_network_ipv6
def get_network_ipv6(self, id_network): """ Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
python
def get_network_ipv6(self, id_network): """ Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
[ "def", "get_network_ipv6", "(", "self", ",", "id_network", ")", ":", "if", "not", "is_valid_int_param", "(", "id_network", ")", ":", "raise", "InvalidParameterError", "(", "u'O id do rede ip6 foi informado incorretamente.'", ")", "url", "=", "'network/ipv6/id/'", "+", ...
Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, 'ambiente_vip': < id_ambiente_viṕ >, 'vlan': <i...
[ "Get", "networkipv6" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L280-L326
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.deallocate_network_ipv4
def deallocate_network_ipv4(self, id_network_ipv4): """ Deallocate all relationships between NetworkIPv4. :param id_network_ipv4: ID for NetworkIPv4 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv4. :raise NetworkIPv4NotFoundError: NetworkIPv4 ...
python
def deallocate_network_ipv4(self, id_network_ipv4): """ Deallocate all relationships between NetworkIPv4. :param id_network_ipv4: ID for NetworkIPv4 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv4. :raise NetworkIPv4NotFoundError: NetworkIPv4 ...
[ "def", "deallocate_network_ipv4", "(", "self", ",", "id_network_ipv4", ")", ":", "if", "not", "is_valid_int_param", "(", "id_network_ipv4", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of NetworkIPv4 is invalid or was not informed.'", ")", "url", "=", ...
Deallocate all relationships between NetworkIPv4. :param id_network_ipv4: ID for NetworkIPv4 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv4. :raise NetworkIPv4NotFoundError: NetworkIPv4 not found. :raise DataBaseError: Networkapi failed to access the...
[ "Deallocate", "all", "relationships", "between", "NetworkIPv4", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L328-L350
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.add_network_ipv6
def add_network_ipv6( self, id_vlan, id_tipo_rede, id_ambiente_vip=None, prefix=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the ...
python
def add_network_ipv6( self, id_vlan, id_tipo_rede, id_ambiente_vip=None, prefix=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the ...
[ "def", "add_network_ipv6", "(", "self", ",", "id_vlan", ",", "id_tipo_rede", ",", "id_ambiente_vip", "=", "None", ",", "prefix", "=", "None", ")", ":", "vlan_map", "=", "dict", "(", ")", "vlan_map", "[", "'id_vlan'", "]", "=", "id_vlan", "vlan_map", "[", ...
Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero. :para...
[ "Add", "new", "networkipv6" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L352-L415
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.add_network_ipv6_hosts
def add_network_ipv6_hosts( self, id_vlan, id_tipo_rede, num_hosts, id_ambiente_vip=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of ...
python
def add_network_ipv6_hosts( self, id_vlan, id_tipo_rede, num_hosts, id_ambiente_vip=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of ...
[ "def", "add_network_ipv6_hosts", "(", "self", ",", "id_vlan", ",", "id_tipo_rede", ",", "num_hosts", ",", "id_ambiente_vip", "=", "None", ")", ":", "vlan_map", "=", "dict", "(", ")", "vlan_map", "[", "'id_vlan'", "]", "=", "id_vlan", "vlan_map", "[", "'id_ti...
Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param num_hosts: Number of hosts expected. Integer value and greater than zero. :param id_ambiente_v...
[ "Add", "new", "networkipv6" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L417-L479
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.deallocate_network_ipv6
def deallocate_network_ipv6(self, id_network_ipv6): """ Deallocate all relationships between NetworkIPv6. :param id_network_ipv6: ID for NetworkIPv6 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv6. :raise NetworkIPv6NotFoundError: NetworkIPv6 ...
python
def deallocate_network_ipv6(self, id_network_ipv6): """ Deallocate all relationships between NetworkIPv6. :param id_network_ipv6: ID for NetworkIPv6 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv6. :raise NetworkIPv6NotFoundError: NetworkIPv6 ...
[ "def", "deallocate_network_ipv6", "(", "self", ",", "id_network_ipv6", ")", ":", "if", "not", "is_valid_int_param", "(", "id_network_ipv6", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of NetworkIPv6 is invalid or was not informed.'", ")", "url", "=", ...
Deallocate all relationships between NetworkIPv6. :param id_network_ipv6: ID for NetworkIPv6 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv6. :raise NetworkIPv6NotFoundError: NetworkIPv6 not found. :raise DataBaseError: Networkapi failed to access the...
[ "Deallocate", "all", "relationships", "between", "NetworkIPv6", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L481-L503
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
Network.remove_networks
def remove_networks(self, ids): """ Set column 'active = 0' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing :raise NetworkInactiveError: Unable to remove the network because it is inactive. :raise InvalidParameterErro...
python
def remove_networks(self, ids): """ Set column 'active = 0' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing :raise NetworkInactiveError: Unable to remove the network because it is inactive. :raise InvalidParameterErro...
[ "def", "remove_networks", "(", "self", ",", "ids", ")", ":", "network_map", "=", "dict", "(", ")", "network_map", "[", "'ids'", "]", "=", "ids", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "'network'", ":", "network_map", "}", ",", "'PU...
Set column 'active = 0' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing :raise NetworkInactiveError: Unable to remove the network because it is inactive. :raise InvalidParameterError: Invalid ID for Network or NetworkType. :r...
[ "Set", "column", "active", "=", "0", "in", "tables", "redeipv4", "and", "redeipv6", "]" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L505-L527
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
DHCPRelayIPv4.add
def add(self, networkipv4_id, ipv4_id): """List all DHCPRelayIPv4. :param: networkipv4_id, ipv4_id :return: Following dictionary: { "networkipv4": <networkipv4_id>, "id": <id>, "ipv4": { "oct4": <oct4>, "oct2": <oct2>, ...
python
def add(self, networkipv4_id, ipv4_id): """List all DHCPRelayIPv4. :param: networkipv4_id, ipv4_id :return: Following dictionary: { "networkipv4": <networkipv4_id>, "id": <id>, "ipv4": { "oct4": <oct4>, "oct2": <oct2>, ...
[ "def", "add", "(", "self", ",", "networkipv4_id", ",", "ipv4_id", ")", ":", "data", "=", "dict", "(", ")", "data", "[", "'networkipv4'", "]", "=", "networkipv4_id", "data", "[", "'ipv4'", "]", "=", "dict", "(", ")", "data", "[", "'ipv4'", "]", "[", ...
List all DHCPRelayIPv4. :param: networkipv4_id, ipv4_id :return: Following dictionary: { "networkipv4": <networkipv4_id>, "id": <id>, "ipv4": { "oct4": <oct4>, "oct2": <oct2>, "oct3": <oct3>, "oct1": <oct1>...
[ "List", "all", "DHCPRelayIPv4", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L541-L570
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
DHCPRelayIPv4.list
def list(self, networkipv4=None, ipv4=None): """List all DHCPRelayIPv4. :param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id :return: Following dictionary: [ { "n...
python
def list(self, networkipv4=None, ipv4=None): """List all DHCPRelayIPv4. :param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id :return: Following dictionary: [ { "n...
[ "def", "list", "(", "self", ",", "networkipv4", "=", "None", ",", "ipv4", "=", "None", ")", ":", "uri", "=", "'api/dhcprelayv4/?'", "if", "networkipv4", ":", "uri", "+=", "'networkipv4=%s&'", "%", "networkipv4", "if", "ipv4", ":", "uri", "+=", "'ipv4=%s'",...
List all DHCPRelayIPv4. :param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id :return: Following dictionary: [ { "networkipv4": <networkipv4_id>, "id": <id>, ...
[ "List", "all", "DHCPRelayIPv4", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L598-L631
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
DHCPRelayIPv6.add
def add(self, networkipv6_id, ipv6_id): """List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, ...
python
def add(self, networkipv6_id, ipv6_id): """List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, ...
[ "def", "add", "(", "self", ",", "networkipv6_id", ",", "ipv6_id", ")", ":", "data", "=", "dict", "(", ")", "data", "[", "'networkipv6'", "]", "=", "networkipv6_id", "data", "[", "'ipv6'", "]", "=", "dict", "(", ")", "data", "[", "'ipv6'", "]", "[", ...
List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, "block3": <block3>, "bloc...
[ "List", "all", "DHCPRelayIPv4", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L657-L690
globocom/GloboNetworkAPI-client-python
networkapiclient/Network.py
DHCPRelayIPv6.list
def list(self, networkipv6=None, ipv6=None): """List all DHCPRelayIPv6. :param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id :return: Following dictionary: [ { "n...
python
def list(self, networkipv6=None, ipv6=None): """List all DHCPRelayIPv6. :param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id :return: Following dictionary: [ { "n...
[ "def", "list", "(", "self", ",", "networkipv6", "=", "None", ",", "ipv6", "=", "None", ")", ":", "uri", "=", "'api/dhcprelayv6/?'", "if", "networkipv6", ":", "uri", "+=", "'networkipv6=%s&'", "%", "networkipv6", "if", "ipv6", ":", "uri", "+=", "'ipv6=%s'",...
List all DHCPRelayIPv6. :param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id :return: Following dictionary: [ { "networkipv6": <networkipv4_id>, "id": <id>, ...
[ "List", "all", "DHCPRelayIPv6", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Network.py#L722-L759
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv6.py
ApiIPv6.search
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiIPv6", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/ipv6/'", ",", "kwargs", ")", ")" ]
Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "ipv6", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv6.py
ApiIPv6.delete
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v3/ipv6/%s/', ids) return super(ApiIPv6, self).delete(url)
python
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v3/ipv6/%s/', ids) return super(ApiIPv6, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/ipv6/%s/'", ",", "ids", ")", "return", "super", "(", "ApiIPv6", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None
[ "Method", "to", "delete", "ipv6", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L65-L73
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv6.py
ApiIPv6.update
def update(self, ipv6s): """ Method to update ipv6's :param ipv6s: List containing ipv6's desired to updated :return: None """ data = {'ips': ipv6s} ipv6s_ids = [str(ipv6.get('id')) for ipv6 in ipv6s] return super(ApiIPv6, self).put('api/v3/ipv6/%s/' % ...
python
def update(self, ipv6s): """ Method to update ipv6's :param ipv6s: List containing ipv6's desired to updated :return: None """ data = {'ips': ipv6s} ipv6s_ids = [str(ipv6.get('id')) for ipv6 in ipv6s] return super(ApiIPv6, self).put('api/v3/ipv6/%s/' % ...
[ "def", "update", "(", "self", ",", "ipv6s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv6s", "}", "ipv6s_ids", "=", "[", "str", "(", "ipv6", ".", "get", "(", "'id'", ")", ")", "for", "ipv6", "in", "ipv6s", "]", "return", "super", "(", "ApiIPv6"...
Method to update ipv6's :param ipv6s: List containing ipv6's desired to updated :return: None
[ "Method", "to", "update", "ipv6", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L75-L87
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv6.py
ApiIPv6.create
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiIPv6, self).post('api/v3/ipv6/', data)
python
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiIPv6, self).post('api/v3/ipv6/', data)
[ "def", "create", "(", "self", ",", "ipv6s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv6s", "}", "return", "super", "(", "ApiIPv6", ",", "self", ")", ".", "post", "(", "'api/v3/ipv6/'", ",", "data", ")" ]
Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None
[ "Method", "to", "create", "ipv6", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv6.py#L89-L98
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv4.py
ApiIPv4.search
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiIPv4", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/ipv4/'", ",", "kwargs", ")", ")" ]
Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "ipv4", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv4.py
ApiIPv4.delete
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v3/ipv4/%s/', ids) return super(ApiIPv4, self).delete(url)
python
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v3/ipv4/%s/', ids) return super(ApiIPv4, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/ipv4/%s/'", ",", "ids", ")", "return", "super", "(", "ApiIPv4", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None
[ "Method", "to", "delete", "ipv4", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L66-L75
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv4.py
ApiIPv4.update
def update(self, ipv4s): """ Method to update ipv4's :param ipv4s: List containing ipv4's desired to updated :return: None """ data = {'ips': ipv4s} ipv4s_ids = [str(ipv4.get('id')) for ipv4 in ipv4s] return super(ApiIPv4, self).put('api/v3/ipv4/%s/' % ...
python
def update(self, ipv4s): """ Method to update ipv4's :param ipv4s: List containing ipv4's desired to updated :return: None """ data = {'ips': ipv4s} ipv4s_ids = [str(ipv4.get('id')) for ipv4 in ipv4s] return super(ApiIPv4, self).put('api/v3/ipv4/%s/' % ...
[ "def", "update", "(", "self", ",", "ipv4s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv4s", "}", "ipv4s_ids", "=", "[", "str", "(", "ipv4", ".", "get", "(", "'id'", ")", ")", "for", "ipv4", "in", "ipv4s", "]", "return", "super", "(", "ApiIPv4"...
Method to update ipv4's :param ipv4s: List containing ipv4's desired to updated :return: None
[ "Method", "to", "update", "ipv4", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L77-L89
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiIPv4.py
ApiIPv4.create
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiIPv4, self).post('api/v3/ipv4/', data)
python
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiIPv4, self).post('api/v3/ipv4/', data)
[ "def", "create", "(", "self", ",", "ipv4s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv4s", "}", "return", "super", "(", "ApiIPv4", ",", "self", ")", ".", "post", "(", "'api/v3/ipv4/'", ",", "data", ")" ]
Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None
[ "Method", "to", "create", "ipv4", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiIPv4.py#L91-L100
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiObjectGroupPermissionGeneral.py
ApiObjectGroupPermissionGeneral.search
def search(self, **kwargs): """ Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array con...
python
def search(self, **kwargs): """ Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array con...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiObjectGroupPermissionGeneral", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/object-group-perm-general/'", ",", "kwargs", ")", ")" ]
Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :...
[ "Method", "to", "search", "object", "group", "permissions", "general", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiObjectGroupPermissionGeneral.py
ApiObjectGroupPermissionGeneral.delete
def delete(self, ids): """ Method to delete object group permissions general by their ids :param ids: Identifiers of object group permissions general :return: None """ url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids) return super(ApiObjectGro...
python
def delete(self, ids): """ Method to delete object group permissions general by their ids :param ids: Identifiers of object group permissions general :return: None """ url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids) return super(ApiObjectGro...
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/object-group-perm-general/%s/'", ",", "ids", ")", "return", "super", "(", "ApiObjectGroupPermissionGeneral", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete object group permissions general by their ids :param ids: Identifiers of object group permissions general :return: None
[ "Method", "to", "delete", "object", "group", "permissions", "general", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L65-L73
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiObjectGroupPermissionGeneral.py
ApiObjectGroupPermissionGeneral.update
def update(self, ogpgs): """ Method to update object group permissions general :param ogpgs: List containing object group permissions general desired to updated :return: None """ data = {'ogpgs': ogpgs} ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs] ...
python
def update(self, ogpgs): """ Method to update object group permissions general :param ogpgs: List containing object group permissions general desired to updated :return: None """ data = {'ogpgs': ogpgs} ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs] ...
[ "def", "update", "(", "self", ",", "ogpgs", ")", ":", "data", "=", "{", "'ogpgs'", ":", "ogpgs", "}", "ogpgs_ids", "=", "[", "str", "(", "ogpg", ".", "get", "(", "'id'", ")", ")", "for", "ogpg", "in", "ogpgs", "]", "return", "super", "(", "ApiObj...
Method to update object group permissions general :param ogpgs: List containing object group permissions general desired to updated :return: None
[ "Method", "to", "update", "object", "group", "permissions", "general" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L75-L87
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiObjectGroupPermissionGeneral.py
ApiObjectGroupPermissionGeneral.create
def create(self, ogpgs): """ Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None """ data = {'ogpgs': ogpgs} return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g...
python
def create(self, ogpgs): """ Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None """ data = {'ogpgs': ogpgs} return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g...
[ "def", "create", "(", "self", ",", "ogpgs", ")", ":", "data", "=", "{", "'ogpgs'", ":", "ogpgs", "}", "return", "super", "(", "ApiObjectGroupPermissionGeneral", ",", "self", ")", ".", "post", "(", "'api/v3/object-group-perm-general/'", ",", "data", ")" ]
Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None
[ "Method", "to", "create", "object", "group", "permissions", "general" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiObjectGroupPermissionGeneral.py#L89-L98
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv6.py
ApiV4IPv6.search
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiV4IPv6", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v4/ipv6/'", ",", "kwargs", ")", ")" ]
Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "ipv6", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv6.py
ApiV4IPv6.delete
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v4/ipv6/%s/', ids) return super(ApiV4IPv6, self).delete(url)
python
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v4/ipv6/%s/', ids) return super(ApiV4IPv6, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v4/ipv6/%s/'", ",", "ids", ")", "return", "super", "(", "ApiV4IPv6", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None
[ "Method", "to", "delete", "ipv6", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L65-L73
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv6.py
ApiV4IPv6.create
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiV4IPv6, self).post('api/v4/ipv6/', data)
python
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiV4IPv6, self).post('api/v4/ipv6/', data)
[ "def", "create", "(", "self", ",", "ipv6s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv6s", "}", "return", "super", "(", "ApiV4IPv6", ",", "self", ")", ".", "post", "(", "'api/v4/ipv6/'", ",", "data", ")" ]
Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None
[ "Method", "to", "create", "ipv6", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv6.py#L89-L98
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.add
def add(self, tipo_opcao, nome_opcao_txt): """Inserts a new Option VIP and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] ...
python
def add(self, tipo_opcao, nome_opcao_txt): """Inserts a new Option VIP and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] ...
[ "def", "add", "(", "self", ",", "tipo_opcao", ",", "nome_opcao_txt", ")", ":", "optionvip_map", "=", "dict", "(", ")", "optionvip_map", "[", "'tipo_opcao'", "]", "=", "tipo_opcao", "optionvip_map", "[", "'nome_opcao_txt'", "]", "=", "nome_opcao_txt", "code", "...
Inserts a new Option VIP and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: ...
[ "Inserts", "a", "new", "Option", "VIP", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L38-L61
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.alter
def alter(self, id_option_vip, tipo_opcao, nome_opcao_txt): """Change Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :para...
python
def alter(self, id_option_vip, tipo_opcao, nome_opcao_txt): """Change Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :para...
[ "def", "alter", "(", "self", ",", "id_option_vip", ",", "tipo_opcao", ",", "nome_opcao_txt", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_vip", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option VIP is invalid or was not informed....
Change Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters a...
[ "Change", "Option", "VIP", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L63-L91
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.remove
def remove(self, id_option_vip): """Remove Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option VIP identifier is null and invalid. :raise OptionVipNotFoun...
python
def remove(self, id_option_vip): """Remove Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option VIP identifier is null and invalid. :raise OptionVipNotFoun...
[ "def", "remove", "(", "self", ",", "id_option_vip", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_vip", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option VIP is invalid or was not informed.'", ")", "url", "=", "'optionvip/'", "+...
Remove Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option VIP identifier is null and invalid. :raise OptionVipNotFoundError: Option VIP not registered. :...
[ "Remove", "Option", "VIP", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L93-L115
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.get_option_vip
def get_option_vip(self, id_environment_vip): """Get all Option VIP by Environment Vip. :return: Dictionary with the following structure: :: {‘option_vip’: [{‘id’: < id >, ‘tipo_opcao’: < tipo_opcao >, ‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option v...
python
def get_option_vip(self, id_environment_vip): """Get all Option VIP by Environment Vip. :return: Dictionary with the following structure: :: {‘option_vip’: [{‘id’: < id >, ‘tipo_opcao’: < tipo_opcao >, ‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option v...
[ "def", "get_option_vip", "(", "self", ",", "id_environment_vip", ")", ":", "url", "=", "'optionvip/environmentvip/'", "+", "str", "(", "id_environment_vip", ")", "+", "'/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "u...
Get all Option VIP by Environment Vip. :return: Dictionary with the following structure: :: {‘option_vip’: [{‘id’: < id >, ‘tipo_opcao’: < tipo_opcao >, ‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option vips ...] } :raise EnvironmentVipNotFoundError: E...
[ "Get", "all", "Option", "VIP", "by", "Environment", "Vip", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L168-L188
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.associate
def associate(self, id_option_vip, id_environment_vip): """Create a relationship of OptionVip with EnvironmentVip. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater tha...
python
def associate(self, id_option_vip, id_environment_vip): """Create a relationship of OptionVip with EnvironmentVip. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater tha...
[ "def", "associate", "(", "self", ",", "id_option_vip", ",", "id_environment_vip", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_vip", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option VIP is invalid or was not informed.'", ")", "i...
Create a relationship of OptionVip with EnvironmentVip. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero. :return: Following dictionary :: ...
[ "Create", "a", "relationship", "of", "OptionVip", "with", "EnvironmentVip", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L190-L224
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.buscar_timeout_opcvip
def buscar_timeout_opcvip(self, id_ambiente_vip): """Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id :return: Dictionary with the following structure: :: {‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>} :raise InvalidParameterErr...
python
def buscar_timeout_opcvip(self, id_ambiente_vip): """Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id :return: Dictionary with the following structure: :: {‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>} :raise InvalidParameterErr...
[ "def", "buscar_timeout_opcvip", "(", "self", ",", "id_ambiente_vip", ")", ":", "if", "not", "is_valid_int_param", "(", "id_ambiente_vip", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of environment-vip is invalid or was not informed.'", ")", "url", "="...
Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id :return: Dictionary with the following structure: :: {‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :...
[ "Buscar", "nome_opcao_txt", "das", "Opcoes", "VIp", "quando", "tipo_opcao", "=", "Timeout", "pelo", "environmentvip_id" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L258-L281
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.buscar_rules
def buscar_rules(self, id_ambiente_vip, id_vip=''): """Search rules ​by environmentvip_id :return: Dictionary with the following structure: :: {'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]} :raise InvalidParameterError: Environment VIP identifier is null ...
python
def buscar_rules(self, id_ambiente_vip, id_vip=''): """Search rules ​by environmentvip_id :return: Dictionary with the following structure: :: {'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]} :raise InvalidParameterError: Environment VIP identifier is null ...
[ "def", "buscar_rules", "(", "self", ",", "id_ambiente_vip", ",", "id_vip", "=", "''", ")", ":", "url", "=", "'environment-vip/get/rules/'", "+", "str", "(", "id_ambiente_vip", ")", "+", "'/'", "+", "str", "(", "id_vip", ")", "code", ",", "xml", "=", "sel...
Search rules ​by environmentvip_id :return: Dictionary with the following structure: :: {'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNotFoundError: Enviro...
[ "Search", "rules", "​by", "environmentvip_id" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L364-L385
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.buscar_healthchecks
def buscar_healthchecks(self, id_ambiente_vip): """Search healthcheck ​by environmentvip_id :return: Dictionary with the following structure: :: {'healthcheck_opt': [{'name': <name>, 'id': <id>},...]} :raise InvalidParameterError: Environment VIP identifier is null and in...
python
def buscar_healthchecks(self, id_ambiente_vip): """Search healthcheck ​by environmentvip_id :return: Dictionary with the following structure: :: {'healthcheck_opt': [{'name': <name>, 'id': <id>},...]} :raise InvalidParameterError: Environment VIP identifier is null and in...
[ "def", "buscar_healthchecks", "(", "self", ",", "id_ambiente_vip", ")", ":", "url", "=", "'environment-vip/get/healthcheck/'", "+", "str", "(", "id_ambiente_vip", ")", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")"...
Search healthcheck ​by environmentvip_id :return: Dictionary with the following structure: :: {'healthcheck_opt': [{'name': <name>, 'id': <id>},...]} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNotFoundError: Environm...
[ "Search", "healthcheck", "​by", "environmentvip_id" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L387-L407
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionVIP.py
OptionVIP.buscar_idtrafficreturn_opcvip
def buscar_idtrafficreturn_opcvip(self, nome_opcao_txt): """Search id of Option VIP when tipo_opcao = 'Retorno de trafego' ​​ :return: Dictionary with the following structure: :: {‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>} :raise InvalidParameterError: Environment ...
python
def buscar_idtrafficreturn_opcvip(self, nome_opcao_txt): """Search id of Option VIP when tipo_opcao = 'Retorno de trafego' ​​ :return: Dictionary with the following structure: :: {‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>} :raise InvalidParameterError: Environment ...
[ "def", "buscar_idtrafficreturn_opcvip", "(", "self", ",", "nome_opcao_txt", ")", ":", "trafficreturn_map", "=", "dict", "(", ")", "trafficreturn_map", "[", "'trafficreturn'", "]", "=", "nome_opcao_txt", "url", "=", "'optionvip/trafficreturn/search/'", "code", ",", "xm...
Search id of Option VIP when tipo_opcao = 'Retorno de trafego' ​​ :return: Dictionary with the following structure: :: {‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNot...
[ "Search", "id", "of", "Option", "VIP", "when", "tipo_opcao", "=", "Retorno", "de", "trafego", "​​" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionVIP.py#L436-L459
globocom/GloboNetworkAPI-client-python
networkapiclient/Modelo.py
Modelo.listar_por_marca
def listar_por_marca(self, id_brand): """List all Model by Brand. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘model’: [{‘id’: < id >, ‘nome’: < nome >, ‘id_ma...
python
def listar_por_marca(self, id_brand): """List all Model by Brand. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘model’: [{‘id’: < id >, ‘nome’: < nome >, ‘id_ma...
[ "def", "listar_por_marca", "(", "self", ",", "id_brand", ")", ":", "if", "not", "is_valid_int_param", "(", "id_brand", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Brand is invalid or was not informed.'", ")", "url", "=", "'model/brand/'", "+", ...
List all Model by Brand. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘model’: [{‘id’: < id >, ‘nome’: < nome >, ‘id_marca’: < id_marca >}, ... too Model ...]} ...
[ "List", "all", "Model", "by", "Brand", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L32-L60
globocom/GloboNetworkAPI-client-python
networkapiclient/Modelo.py
Modelo.inserir
def inserir(self, id_brand, name): """Inserts a new Model and returns its identifier :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following stru...
python
def inserir(self, id_brand, name): """Inserts a new Model and returns its identifier :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following stru...
[ "def", "inserir", "(", "self", ",", "id_brand", ",", "name", ")", ":", "model_map", "=", "dict", "(", ")", "model_map", "[", "'name'", "]", "=", "name", "model_map", "[", "'id_brand'", "]", "=", "id_brand", "code", ",", "xml", "=", "self", ".", "subm...
Inserts a new Model and returns its identifier :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'model': {'id...
[ "Inserts", "a", "new", "Model", "and", "returns", "its", "identifier" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L95-L119
globocom/GloboNetworkAPI-client-python
networkapiclient/Modelo.py
Modelo.alterar
def alterar(self, id_model, id_brand, name): """Change Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minim...
python
def alterar(self, id_model, id_brand, name): """Change Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minim...
[ "def", "alterar", "(", "self", ",", "id_model", ",", "id_brand", ",", "name", ")", ":", "if", "not", "is_valid_int_param", "(", "id_model", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Model is invalid or was not informed.'", ")", "model_map",...
Change Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Non...
[ "Change", "Model", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L121-L150
globocom/GloboNetworkAPI-client-python
networkapiclient/Modelo.py
Modelo.remover
def remover(self, id_model): """Remove Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Model is null and invalid. :raise ModeloEquipamentoNaoExisteError: ...
python
def remover(self, id_model): """Remove Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Model is null and invalid. :raise ModeloEquipamentoNaoExisteError: ...
[ "def", "remover", "(", "self", ",", "id_model", ")", ":", "if", "not", "is_valid_int_param", "(", "id_model", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Model is invalid or was not informed.'", ")", "url", "=", "'model/'", "+", "str", "(",...
Remove Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Model is null and invalid. :raise ModeloEquipamentoNaoExisteError: Model not registered. :raise Mod...
[ "Remove", "Model", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Modelo.py#L152-L174
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.listar_por_equipamento
def listar_por_equipamento(self, id_equipamento): """List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, ...
python
def listar_por_equipamento(self, id_equipamento): """List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, ...
[ "def", "listar_por_equipamento", "(", "self", ",", "id_equipamento", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'Equipment id is invalid or was not informed.'", ")", "url", "=", "'interface/equipa...
List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, 'id_ligacao_front': < id_ligacao_front >, 'id...
[ "List", "all", "interfaces", "of", "an", "equipment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L41-L72
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.get_by_id
def get_by_id(self, id_interface): """Get an interface by id. :param id_interface: Interface identifier. :return: Following dictionary: :: {'interface': {'id': < id >, 'interface': < interface >, 'descricao': < descricao >, 'protegida':...
python
def get_by_id(self, id_interface): """Get an interface by id. :param id_interface: Interface identifier. :return: Following dictionary: :: {'interface': {'id': < id >, 'interface': < interface >, 'descricao': < descricao >, 'protegida':...
[ "def", "get_by_id", "(", "self", ",", "id_interface", ")", ":", "if", "not", "is_valid_int_param", "(", "id_interface", ")", ":", "raise", "InvalidParameterError", "(", "u'Interface id is invalid or was not informed.'", ")", "url", "=", "'interface/'", "+", "str", "...
Get an interface by id. :param id_interface: Interface identifier. :return: Following dictionary: :: {'interface': {'id': < id >, 'interface': < interface >, 'descricao': < descricao >, 'protegida': < protegida >, 'tipo_equip': < id...
[ "Get", "an", "interface", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L112-L147
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.inserir
def inserir( self, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, id_equipamento, tipo=None, vlan=None): """Insert new interface for an equipment. :param nome: Interface name. ...
python
def inserir( self, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, id_equipamento, tipo=None, vlan=None): """Insert new interface for an equipment. :param nome: Interface name. ...
[ "def", "inserir", "(", "self", ",", "nome", ",", "protegida", ",", "descricao", ",", "id_ligacao_front", ",", "id_ligacao_back", ",", "id_equipamento", ",", "tipo", "=", "None", ",", "vlan", "=", "None", ")", ":", "interface_map", "=", "dict", "(", ")", ...
Insert new interface for an equipment. :param nome: Interface name. :param protegida: Indication of protected ('0' or '1'). :param descricao: Interface description. :param id_ligacao_front: Front end link interface identifier. :param id_ligacao_back: Back end link interface iden...
[ "Insert", "new", "interface", "for", "an", "equipment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L149-L189
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.alterar
def alterar( self, id_interface, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, tipo=None, vlan=None): """Edit an interface by its identifier. Equipment identifier is not changed....
python
def alterar( self, id_interface, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, tipo=None, vlan=None): """Edit an interface by its identifier. Equipment identifier is not changed....
[ "def", "alterar", "(", "self", ",", "id_interface", ",", "nome", ",", "protegida", ",", "descricao", ",", "id_ligacao_front", ",", "id_ligacao_back", ",", "tipo", "=", "None", ",", "vlan", "=", "None", ")", ":", "if", "not", "is_valid_int_param", "(", "id_...
Edit an interface by its identifier. Equipment identifier is not changed. :param nome: Interface name. :param protegida: Indication of protected ('0' or '1'). :param descricao: Interface description. :param id_ligacao_front: Front end link interface identifier. :param i...
[ "Edit", "an", "interface", "by", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L191-L237
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.remover
def remover(self, id_interface): """Remove an interface by its identifier. :param id_interface: Interface identifier. :return: None :raise InterfaceNaoExisteError: Interface doesn't exist. :raise InterfaceError: Interface is linked to another interface. :raise InvalidP...
python
def remover(self, id_interface): """Remove an interface by its identifier. :param id_interface: Interface identifier. :return: None :raise InterfaceNaoExisteError: Interface doesn't exist. :raise InterfaceError: Interface is linked to another interface. :raise InvalidP...
[ "def", "remover", "(", "self", ",", "id_interface", ")", ":", "if", "not", "is_valid_int_param", "(", "id_interface", ")", ":", "raise", "InvalidParameterError", "(", "u'Interface id is invalid or was not informed.'", ")", "url", "=", "'interface/'", "+", "str", "("...
Remove an interface by its identifier. :param id_interface: Interface identifier. :return: None :raise InterfaceNaoExisteError: Interface doesn't exist. :raise InterfaceError: Interface is linked to another interface. :raise InvalidParameterError: The interface identifier is i...
[ "Remove", "an", "interface", "by", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L239-L260
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.remove_connection
def remove_connection(self, id_interface, back_or_front): """ Remove a connection between two interfaces :param id_interface: One side of relation :param back_or_front: This side of relation is back(0) or front(1) :return: None :raise InterfaceInvalidBackFrontError: Fr...
python
def remove_connection(self, id_interface, back_or_front): """ Remove a connection between two interfaces :param id_interface: One side of relation :param back_or_front: This side of relation is back(0) or front(1) :return: None :raise InterfaceInvalidBackFrontError: Fr...
[ "def", "remove_connection", "(", "self", ",", "id_interface", ",", "back_or_front", ")", ":", "msg_err", "=", "u'Parameter %s is invalid. Value: %s.'", "if", "not", "is_valid_0_1", "(", "back_or_front", ")", ":", "raise", "InvalidParameterError", "(", "msg_err", "%", ...
Remove a connection between two interfaces :param id_interface: One side of relation :param back_or_front: This side of relation is back(0) or front(1) :return: None :raise InterfaceInvalidBackFrontError: Front or Back of interfaces not match to remove connection :raise Invali...
[ "Remove", "a", "connection", "between", "two", "interfaces" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L262-L293
globocom/GloboNetworkAPI-client-python
networkapiclient/Interface.py
Interface.list_connections
def list_connections(self, nome_interface, id_equipamento): """List interfaces linked to back and front of specified interface. :param nome_interface: Interface name. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interfa...
python
def list_connections(self, nome_interface, id_equipamento): """List interfaces linked to back and front of specified interface. :param nome_interface: Interface name. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interfa...
[ "def", "list_connections", "(", "self", ",", "nome_interface", ",", "id_equipamento", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'Equipment identifier is none or was not informed.'", ")", "if", ...
List interfaces linked to back and front of specified interface. :param nome_interface: Interface name. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interfaces':[ {'id': < id >, 'interface': < nome >, 'd...
[ "List", "interfaces", "linked", "to", "back", "and", "front", "of", "specified", "interface", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Interface.py#L335-L381
globocom/GloboNetworkAPI-client-python
networkapiclient/Permission.py
Permission.list_all
def list_all(self): """List all Permission. :return: Dictionary with the following structure: :: {'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Netwo...
python
def list_all(self): """List all Permission. :return: Dictionary with the following structure: :: {'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Netwo...
[ "def", "list_all", "(", "self", ")", ":", "code", ",", "map", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "'perms/all/'", ")", "key", "=", "'perms'", "return", "get_list_map", "(", "self", ".", "response", "(", "code", ",", "map", ","...
List all Permission. :return: Dictionary with the following structure: :: {'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XM...
[ "List", "all", "Permission", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Permission.py#L37-L52
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv4.py
ApiV4IPv4.search
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiV4IPv4", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v4/ipv4/'", ",", "kwargs", ")", ")" ]
Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "ipv4", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L36-L49
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv4.py
ApiV4IPv4.delete
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v4/ipv4/%s/', ids) return super(ApiV4IPv4, self).delete(url)
python
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v4/ipv4/%s/', ids) return super(ApiV4IPv4, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v4/ipv4/%s/'", ",", "ids", ")", "return", "super", "(", "ApiV4IPv4", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None
[ "Method", "to", "delete", "ipv4", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L66-L75
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiV4IPv4.py
ApiV4IPv4.create
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiV4IPv4, self).post('api/v4/ipv4/', data)
python
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiV4IPv4, self).post('api/v4/ipv4/', data)
[ "def", "create", "(", "self", ",", "ipv4s", ")", ":", "data", "=", "{", "'ips'", ":", "ipv4s", "}", "return", "super", "(", "ApiV4IPv4", ",", "self", ")", ".", "post", "(", "'api/v4/ipv4/'", ",", "data", ")" ]
Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None
[ "Method", "to", "create", "ipv4", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiV4IPv4.py#L91-L100
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoVirtual.py
GrupoVirtual.provisionar
def provisionar(self, equipamentos, vips): """Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs ger...
python
def provisionar(self, equipamentos, vips): """Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs ger...
[ "def", "provisionar", "(", "self", ",", "equipamentos", ",", "vips", ")", ":", "code", ",", "map", "=", "self", ".", "submit", "(", "{", "'equipamentos'", ":", "{", "'equipamento'", ":", "equipamentos", "}", ",", "'vips'", ":", "{", "'vip'", ":", "vips...
Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs gerada pelo método "add_vip" da classe "EspecificacaoGrup...
[ "Realiza", "a", "inserção", "ou", "alteração", "de", "um", "grupo", "virtual", "para", "o", "sistema", "de", "Orquestração", "de", "VM", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoVirtual.py#L29-L109
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoVirtual.py
GrupoVirtual.remover_provisionamento
def remover_provisionamento(self, equipamentos, vips): """Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de...
python
def remover_provisionamento(self, equipamentos, vips): """Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de...
[ "def", "remover_provisionamento", "(", "self", ",", "equipamentos", ",", "vips", ")", ":", "code", ",", "map", "=", "self", ".", "submit", "(", "{", "'equipamentos'", ":", "{", "'equipamento'", ":", "equipamentos", "}", ",", "'vips'", ":", "{", "'vip'", ...
Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs gerada pelo método "add_vip_remove" da classe "Especificacao...
[ "Remove", "o", "provisionamento", "de", "um", "grupo", "virtual", "para", "o", "sistema", "de", "Orquestração", "VM", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoVirtual.py#L111-L131
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.list_with_usergroup
def list_with_usergroup(self): """List all users and their user groups. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, ...
python
def list_with_usergroup(self): """List all users and their user groups. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, ...
[ "def", "list_with_usergroup", "(", "self", ")", ":", "url", "=", "'usuario/get/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", "(", "code", ",", "xml", ")" ]
List all users and their user groups. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, 'pwd': < pwd >, 'user': < us...
[ "List", "all", "users", "and", "their", "user", "groups", ".", "is_more", "-", "If", "more", "than", "3", "of", "groups", "of", "users", "or", "no", "to", "control", "expansion", "Screen", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L121-L146
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.get_by_user_ldap
def get_by_user_ldap(self, user_name): """Get user by the ldap name. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, '...
python
def get_by_user_ldap(self, user_name): """Get user by the ldap name. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, '...
[ "def", "get_by_user_ldap", "(", "self", ",", "user_name", ")", ":", "url", "=", "'user/get/ldap/'", "+", "str", "(", "user_name", ")", "+", "'/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "...
Get user by the ldap name. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, 'pwd': < pwd >, 'user': < user >, ...
[ "Get", "user", "by", "the", "ldap", "name", ".", "is_more", "-", "If", "more", "than", "3", "of", "groups", "of", "users", "or", "no", "to", "control", "expansion", "Screen", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L179-L204
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.inserir
def inserir(self, user, pwd, name, email, user_ldap): """Inserts a new User and returns its identifier. The user will be created with active status. :param user: Username. String with a minimum 3 and maximum of 45 characters :param pwd: User password. String with a minimum 3 and maximu...
python
def inserir(self, user, pwd, name, email, user_ldap): """Inserts a new User and returns its identifier. The user will be created with active status. :param user: Username. String with a minimum 3 and maximum of 45 characters :param pwd: User password. String with a minimum 3 and maximu...
[ "def", "inserir", "(", "self", ",", "user", ",", "pwd", ",", "name", ",", "email", ",", "user_ldap", ")", ":", "user_map", "=", "dict", "(", ")", "user_map", "[", "'user'", "]", "=", "user", "user_map", "[", "'password'", "]", "=", "pwd", "user_map",...
Inserts a new User and returns its identifier. The user will be created with active status. :param user: Username. String with a minimum 3 and maximum of 45 characters :param pwd: User password. String with a minimum 3 and maximum of 45 characters :param name: User name. String with a ...
[ "Inserts", "a", "new", "User", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L206-L237
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.alterar
def alterar(self, id_user, user, password, nome, ativo, email, user_ldap): """Change User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user: Username. String with a minimum 3 and maximum of 45 characters :param password: Use...
python
def alterar(self, id_user, user, password, nome, ativo, email, user_ldap): """Change User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user: Username. String with a minimum 3 and maximum of 45 characters :param password: Use...
[ "def", "alterar", "(", "self", ",", "id_user", ",", "user", ",", "password", ",", "nome", ",", "ativo", ",", "email", ",", "user_ldap", ")", ":", "if", "not", "is_valid_int_param", "(", "id_user", ")", ":", "raise", "InvalidParameterError", "(", "u'The ide...
Change User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :param nome: ...
[ "Change", "User", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L239-L275
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.change_password
def change_password(self, id_user, user_current_password, password): """Change password of User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user_current_password: Senha atual do usuário. :param password: Nova Senha do usuár...
python
def change_password(self, id_user, user_current_password, password): """Change password of User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user_current_password: Senha atual do usuário. :param password: Nova Senha do usuár...
[ "def", "change_password", "(", "self", ",", "id_user", ",", "user_current_password", ",", "password", ")", ":", "if", "not", "is_valid_int_param", "(", "id_user", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of User is invalid or was not informed.'",...
Change password of User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user_current_password: Senha atual do usuário. :param password: Nova Senha do usuário. :return: None :raise UsuarioNaoExisteError: User not regis...
[ "Change", "password", "of", "User", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L277-L307
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.authenticate
def authenticate(self, username, password, is_ldap_user): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :re...
python
def authenticate(self, username, password, is_ldap_user): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :re...
[ "def", "authenticate", "(", "self", ",", "username", ",", "password", ",", "is_ldap_user", ")", ":", "user_map", "=", "dict", "(", ")", "user_map", "[", "'username'", "]", "=", "username", "user_map", "[", "'password'", "]", "=", "password", "user_map", "[...
Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Following dictionary: :: {'user': {'id': ...
[ "Get", "user", "by", "username", "and", "password", "and", "their", "permissions", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L331-L360
globocom/GloboNetworkAPI-client-python
networkapiclient/Usuario.py
Usuario.authenticate_ldap
def authenticate_ldap(self, username, password): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Fol...
python
def authenticate_ldap(self, username, password): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Fol...
[ "def", "authenticate_ldap", "(", "self", ",", "username", ",", "password", ")", ":", "user_map", "=", "dict", "(", ")", "user_map", "[", "'username'", "]", "=", "username", "user_map", "[", "'password'", "]", "=", "password", "code", ",", "xml", "=", "se...
Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Following dictionary: :: {'user': {'id': ...
[ "Get", "user", "by", "username", "and", "password", "and", "their", "permissions", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Usuario.py#L362-L391
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoAcesso.py
TipoAcesso.listar
def listar(self): """List all access types. :return: Dictionary with structure: :: {‘tipo_acesso’: [{‘id’: < id >, ‘protocolo’: < protocolo >}, ... other access types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError...
python
def listar(self): """List all access types. :return: Dictionary with structure: :: {‘tipo_acesso’: [{‘id’: < id >, ‘protocolo’: < protocolo >}, ... other access types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError...
[ "def", "listar", "(", "self", ")", ":", "code", ",", "map", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "'tipoacesso/'", ")", "key", "=", "'tipo_acesso'", "return", "get_list_map", "(", "self", ".", "response", "(", "code", ",", "map", ...
List all access types. :return: Dictionary with structure: :: {‘tipo_acesso’: [{‘id’: < id >, ‘protocolo’: < protocolo >}, ... other access types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to genera...
[ "List", "all", "access", "types", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L38-L54
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoAcesso.py
TipoAcesso.inserir
def inserir(self, protocolo): """Insert new access type and returns its identifier. :param protocolo: Protocol. :return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}} :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: ...
python
def inserir(self, protocolo): """Insert new access type and returns its identifier. :param protocolo: Protocol. :return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}} :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: ...
[ "def", "inserir", "(", "self", ",", "protocolo", ")", ":", "tipo_acesso_map", "=", "dict", "(", ")", "tipo_acesso_map", "[", "'protocolo'", "]", "=", "protocolo", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "'tipo_acesso'", ":", "tipo_acesso_...
Insert new access type and returns its identifier. :param protocolo: Protocol. :return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}} :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: Protocol value is invalid or none. ...
[ "Insert", "new", "access", "type", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L56-L74
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoAcesso.py
TipoAcesso.alterar
def alterar(self, id_tipo_acesso, protocolo): """Edit access type by its identifier. :param id_tipo_acesso: Access type identifier. :param protocolo: Protocol. :return: None :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError...
python
def alterar(self, id_tipo_acesso, protocolo): """Edit access type by its identifier. :param id_tipo_acesso: Access type identifier. :param protocolo: Protocol. :return: None :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError...
[ "def", "alterar", "(", "self", ",", "id_tipo_acesso", ",", "protocolo", ")", ":", "if", "not", "is_valid_int_param", "(", "id_tipo_acesso", ")", ":", "raise", "InvalidParameterError", "(", "u'Access type id is invalid or was not informed.'", ")", "tipo_acesso_map", "=",...
Edit access type by its identifier. :param id_tipo_acesso: Access type identifier. :param protocolo: Protocol. :return: None :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: Protocol value is invalid or none. :raise TipoA...
[ "Edit", "access", "type", "by", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L76-L101
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoAcesso.py
TipoAcesso.remover
def remover(self, id_tipo_acesso): """Removes access type by its identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise TipoAcessoError: Access type associated with equipment, cannot be removed. :raise InvalidParameterError: Protocol value is invalid o...
python
def remover(self, id_tipo_acesso): """Removes access type by its identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise TipoAcessoError: Access type associated with equipment, cannot be removed. :raise InvalidParameterError: Protocol value is invalid o...
[ "def", "remover", "(", "self", ",", "id_tipo_acesso", ")", ":", "if", "not", "is_valid_int_param", "(", "id_tipo_acesso", ")", ":", "raise", "InvalidParameterError", "(", "u'Access type id is invalid or was not informed.'", ")", "url", "=", "'tipoacesso/'", "+", "str"...
Removes access type by its identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise TipoAcessoError: Access type associated with equipment, cannot be removed. :raise InvalidParameterError: Protocol value is invalid or none. :raise TipoAcessoNaoExisteErro...
[ "Removes", "access", "type", "by", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoAcesso.py#L103-L124
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoRoteiro.py
TipoRoteiro.inserir
def inserir(self, type, description): """Inserts a new Script Type and returns its identifier. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maximum of 100 characters :return:...
python
def inserir(self, type, description): """Inserts a new Script Type and returns its identifier. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maximum of 100 characters :return:...
[ "def", "inserir", "(", "self", ",", "type", ",", "description", ")", ":", "script_type_map", "=", "dict", "(", ")", "script_type_map", "[", "'type'", "]", "=", "type", "script_type_map", "[", "'description'", "]", "=", "description", "code", ",", "xml", "=...
Inserts a new Script Type and returns its identifier. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: ...
[ "Inserts", "a", "new", "Script", "Type", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L58-L82
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoRoteiro.py
TipoRoteiro.alterar
def alterar(self, id_script_type, type, description): """Change Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param descr...
python
def alterar(self, id_script_type, type, description): """Change Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param descr...
[ "def", "alterar", "(", "self", ",", "id_script_type", ",", "type", ",", "description", ")", ":", "if", "not", "is_valid_int_param", "(", "id_script_type", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Script Type is invalid or was not informed.'", ...
Change Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maxi...
[ "Change", "Script", "Type", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L84-L111
globocom/GloboNetworkAPI-client-python
networkapiclient/TipoRoteiro.py
TipoRoteiro.remover
def remover(self, id_script_type): """Remove Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script Type is null and invalid. :raise Tip...
python
def remover(self, id_script_type): """Remove Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script Type is null and invalid. :raise Tip...
[ "def", "remover", "(", "self", ",", "id_script_type", ")", ":", "if", "not", "is_valid_int_param", "(", "id_script_type", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Script Type is invalid or was not informed.'", ")", "url", "=", "'scripttype/'",...
Remove Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script Type is null and invalid. :raise TipoRoteiroNaoExisteError: Script Type not regist...
[ "Remove", "Script", "Type", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/TipoRoteiro.py#L113-L134
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.pool_by_environmentvip
def pool_by_environmentvip(self, environment_vip_id): """ Method to return list object pool by environment vip id Param environment_vip_id: environment vip id Return list object pool """ uri = 'api/v3/pool/environment-vip/%s/' % environment_vip_id return super(A...
python
def pool_by_environmentvip(self, environment_vip_id): """ Method to return list object pool by environment vip id Param environment_vip_id: environment vip id Return list object pool """ uri = 'api/v3/pool/environment-vip/%s/' % environment_vip_id return super(A...
[ "def", "pool_by_environmentvip", "(", "self", ",", "environment_vip_id", ")", ":", "uri", "=", "'api/v3/pool/environment-vip/%s/'", "%", "environment_vip_id", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "get", "(", "uri", ")" ]
Method to return list object pool by environment vip id Param environment_vip_id: environment vip id Return list object pool
[ "Method", "to", "return", "list", "object", "pool", "by", "environment", "vip", "id", "Param", "environment_vip_id", ":", "environment", "vip", "id", "Return", "list", "object", "pool" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L36-L45
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.pool_by_id
def pool_by_id(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/%s/' % pool_id return super(ApiPool, self).get(uri)
python
def pool_by_id(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/%s/' % pool_id return super(ApiPool, self).get(uri)
[ "def", "pool_by_id", "(", "self", ",", "pool_id", ")", ":", "uri", "=", "'api/v3/pool/%s/'", "%", "pool_id", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "get", "(", "uri", ")" ]
Method to return object pool by id Param pool_id: pool id Returns object pool
[ "Method", "to", "return", "object", "pool", "by", "id", "Param", "pool_id", ":", "pool", "id", "Returns", "object", "pool" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L47-L56
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.get_pool_details
def get_pool_details(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/details/%s/' % pool_id return super(ApiPool, self).get(uri)
python
def get_pool_details(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/details/%s/' % pool_id return super(ApiPool, self).get(uri)
[ "def", "get_pool_details", "(", "self", ",", "pool_id", ")", ":", "uri", "=", "'api/v3/pool/details/%s/'", "%", "pool_id", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "get", "(", "uri", ")" ]
Method to return object pool by id Param pool_id: pool id Returns object pool
[ "Method", "to", "return", "object", "pool", "by", "id", "Param", "pool_id", ":", "pool", "id", "Returns", "object", "pool" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L58-L67
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.search
def search(self, **kwargs): """ Method to search pool's based on extends search. :param search: Dict containing QuerySets to find pool's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search pool's based on extends search. :param search: Dict containing QuerySets to find pool's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/pool/'", ",", "kwargs", ")", ")" ]
Method to search pool's based on extends search. :param search: Dict containing QuerySets to find pool's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "pool", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L69-L82
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.delete
def delete(self, ids): """ Method to delete pool's by their ids :param ids: Identifiers of pool's :return: None """ url = build_uri_with_ids('api/v3/pool/%s/', ids) return super(ApiPool, self).delete(url)
python
def delete(self, ids): """ Method to delete pool's by their ids :param ids: Identifiers of pool's :return: None """ url = build_uri_with_ids('api/v3/pool/%s/', ids) return super(ApiPool, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/pool/%s/'", ",", "ids", ")", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete pool's by their ids :param ids: Identifiers of pool's :return: None
[ "Method", "to", "delete", "pool", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L99-L108
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.update
def update(self, pools): """ Method to update pool's :param pools: List containing pool's desired to updated :return: None """ data = {'server_pools': pools} pools_ids = [str(pool.get('id')) for pool in pools] return super(ApiPool, ...
python
def update(self, pools): """ Method to update pool's :param pools: List containing pool's desired to updated :return: None """ data = {'server_pools': pools} pools_ids = [str(pool.get('id')) for pool in pools] return super(ApiPool, ...
[ "def", "update", "(", "self", ",", "pools", ")", ":", "data", "=", "{", "'server_pools'", ":", "pools", "}", "pools_ids", "=", "[", "str", "(", "pool", ".", "get", "(", "'id'", ")", ")", "for", "pool", "in", "pools", "]", "return", "super", "(", ...
Method to update pool's :param pools: List containing pool's desired to updated :return: None
[ "Method", "to", "update", "pool", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L110-L123
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPool.py
ApiPool.create
def create(self, pools): """ Method to create pool's :param pools: List containing pool's desired to be created on database :return: None """ data = {'server_pools': pools} return super(ApiPool, self).post('api/v3/pool/', data)
python
def create(self, pools): """ Method to create pool's :param pools: List containing pool's desired to be created on database :return: None """ data = {'server_pools': pools} return super(ApiPool, self).post('api/v3/pool/', data)
[ "def", "create", "(", "self", ",", "pools", ")", ":", "data", "=", "{", "'server_pools'", ":", "pools", "}", "return", "super", "(", "ApiPool", ",", "self", ")", ".", "post", "(", "'api/v3/pool/'", ",", "data", ")" ]
Method to create pool's :param pools: List containing pool's desired to be created on database :return: None
[ "Method", "to", "create", "pool", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPool.py#L125-L134
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.get_real_related
def get_real_related(self, id_equip): """ Find reals related with equipment :param id_equip: Identifier of equipment :return: Following dictionary: :: {'vips': [{'port_real': < port_real >, 'server_pool_member_id': < server_pool_member_id >, ...
python
def get_real_related(self, id_equip): """ Find reals related with equipment :param id_equip: Identifier of equipment :return: Following dictionary: :: {'vips': [{'port_real': < port_real >, 'server_pool_member_id': < server_pool_member_id >, ...
[ "def", "get_real_related", "(", "self", ",", "id_equip", ")", ":", "url", "=", "'equipamento/get_real_related/'", "+", "str", "(", "id_equip", ")", "+", "'/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", ...
Find reals related with equipment :param id_equip: Identifier of equipment :return: Following dictionary: :: {'vips': [{'port_real': < port_real >, 'server_pool_member_id': < server_pool_member_id >, 'ip': < ip >, 'port_vip': < port_vip >, ...
[ "Find", "reals", "related", "with", "equipment" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L40-L68
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.find_equips
def find_equips( self, name, iexact, environment, equip_type, group, ip, pagination): """ Find vlans by all search parameters :param name: Filter by vlan name column :param iexact: Filter by ...
python
def find_equips( self, name, iexact, environment, equip_type, group, ip, pagination): """ Find vlans by all search parameters :param name: Filter by vlan name column :param iexact: Filter by ...
[ "def", "find_equips", "(", "self", ",", "name", ",", "iexact", ",", "environment", ",", "equip_type", ",", "group", ",", "ip", ",", "pagination", ")", ":", "if", "not", "isinstance", "(", "pagination", ",", "Pagination", ")", ":", "raise", "InvalidParamete...
Find vlans by all search parameters :param name: Filter by vlan name column :param iexact: Filter by name will be exact? :param environment: Filter by environment ID related :param equip_type: Filter by equipment_type ID related :param group: Filter by equipment group ID related...
[ "Find", "vlans", "by", "all", "search", "parameters" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L70-L139
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.inserir
def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False): """Inserts a new Equipment and returns its identifier Além de inserir o equipamento, a networkAPI também associa o equipamento ao grupo informado. :param name: Equipment name. String with a minimum 3 and...
python
def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False): """Inserts a new Equipment and returns its identifier Além de inserir o equipamento, a networkAPI também associa o equipamento ao grupo informado. :param name: Equipment name. String with a minimum 3 and...
[ "def", "inserir", "(", "self", ",", "name", ",", "id_equipment_type", ",", "id_model", ",", "id_group", ",", "maintenance", "=", "False", ")", ":", "equip_map", "=", "dict", "(", ")", "equip_map", "[", "'id_tipo_equipamento'", "]", "=", "id_equipment_type", ...
Inserts a new Equipment and returns its identifier Além de inserir o equipamento, a networkAPI também associa o equipamento ao grupo informado. :param name: Equipment name. String with a minimum 3 and maximum of 30 characters :param id_equipment_type: Identifier of the Equipment Type. ...
[ "Inserts", "a", "new", "Equipment", "and", "returns", "its", "identifier" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L141-L181
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.edit
def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None): """Change Equipment from by the identifier. :param id_equip: Identifier of the Equipment. Integer value and greater than zero. :param nome: Equipment name. String with a minimum 3 and maximum of 30 characters ...
python
def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None): """Change Equipment from by the identifier. :param id_equip: Identifier of the Equipment. Integer value and greater than zero. :param nome: Equipment name. String with a minimum 3 and maximum of 30 characters ...
[ "def", "edit", "(", "self", ",", "id_equip", ",", "nome", ",", "id_tipo_equipamento", ",", "id_modelo", ",", "maintenance", "=", "None", ")", ":", "equip_map", "=", "dict", "(", ")", "equip_map", "[", "'id_equip'", "]", "=", "id_equip", "equip_map", "[", ...
Change Equipment from by the identifier. :param id_equip: Identifier of the Equipment. Integer value and greater than zero. :param nome: Equipment name. String with a minimum 3 and maximum of 30 characters :param id_tipo_equipamento: Identifier of the Equipment Type. Integer value and greater t...
[ "Change", "Equipment", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L183-L220
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.criar_ip
def criar_ip(self, id_vlan, id_equipamento, descricao): """Aloca um IP em uma VLAN para um equipamento. Insere um novo IP para a VLAN e o associa ao equipamento. :param id_vlan: Identificador da vlan. :param id_equipamento: Identificador do equipamento. :param descricao: Descri...
python
def criar_ip(self, id_vlan, id_equipamento, descricao): """Aloca um IP em uma VLAN para um equipamento. Insere um novo IP para a VLAN e o associa ao equipamento. :param id_vlan: Identificador da vlan. :param id_equipamento: Identificador do equipamento. :param descricao: Descri...
[ "def", "criar_ip", "(", "self", ",", "id_vlan", ",", "id_equipamento", ",", "descricao", ")", ":", "ip_map", "=", "dict", "(", ")", "ip_map", "[", "'id_vlan'", "]", "=", "id_vlan", "ip_map", "[", "'descricao'", "]", "=", "descricao", "ip_map", "[", "'id_...
Aloca um IP em uma VLAN para um equipamento. Insere um novo IP para a VLAN e o associa ao equipamento. :param id_vlan: Identificador da vlan. :param id_equipamento: Identificador do equipamento. :param descricao: Descriçao do IP. :return: Dicionário com a seguinte estrutura: ...
[ "Aloca", "um", "IP", "em", "uma", "VLAN", "para", "um", "equipamento", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L222-L257
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.add_ipv4
def add_ipv4(self, id_network_ipv4, id_equipamento, descricao): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv4: ID for NetworkIPv4. :param id_equipamento: ID for Equipment. :param descricao: Descrip...
python
def add_ipv4(self, id_network_ipv4, id_equipamento, descricao): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv4: ID for NetworkIPv4. :param id_equipamento: ID for Equipment. :param descricao: Descrip...
[ "def", "add_ipv4", "(", "self", ",", "id_network_ipv4", ",", "id_equipamento", ",", "descricao", ")", ":", "ip_map", "=", "dict", "(", ")", "ip_map", "[", "'id_network_ipv4'", "]", "=", "id_network_ipv4", "ip_map", "[", "'description'", "]", "=", "descricao", ...
Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv4: ID for NetworkIPv4. :param id_equipamento: ID for Equipment. :param descricao: Description for IP. :return: Following dictionary: :: ...
[ "Allocate", "an", "IP", "on", "a", "network", "to", "an", "equipment", ".", "Insert", "new", "IP", "for", "network", "and", "associate", "to", "the", "equipment" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L259-L296
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.add_ipv6
def add_ipv6(self, id_network_ipv6, id_equip, description): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for...
python
def add_ipv6(self, id_network_ipv6, id_equip, description): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for...
[ "def", "add_ipv6", "(", "self", ",", "id_network_ipv6", ",", "id_equip", ",", "description", ")", ":", "ip_map", "=", "dict", "(", ")", "ip_map", "[", "'id_network_ipv6'", "]", "=", "id_network_ipv6", "ip_map", "[", "'description'", "]", "=", "description", ...
Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for IP. :return: Following dictionary: :: {...
[ "Allocate", "an", "IP", "on", "a", "network", "to", "an", "equipment", ".", "Insert", "new", "IP", "for", "network", "and", "associate", "to", "the", "equipment" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L298-L339
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.remover_ip
def remover_ip(self, id_equipamento, id_ip): """Removes association of IP and Equipment. If IP has no other association with equipments, IP is also removed. :param id_equipamento: Equipment identifier :param id_ip: IP identifier. :return: None :raise VipIpError: Ip can...
python
def remover_ip(self, id_equipamento, id_ip): """Removes association of IP and Equipment. If IP has no other association with equipments, IP is also removed. :param id_equipamento: Equipment identifier :param id_ip: IP identifier. :return: None :raise VipIpError: Ip can...
[ "def", "remover_ip", "(", "self", ",", "id_equipamento", ",", "id_ip", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do equipamento é inválido ou não foi informado.')", "", "if", "...
Removes association of IP and Equipment. If IP has no other association with equipments, IP is also removed. :param id_equipamento: Equipment identifier :param id_ip: IP identifier. :return: None :raise VipIpError: Ip can't be removed because there is a created Vip Request. ...
[ "Removes", "association", "of", "IP", "and", "Equipment", ".", "If", "IP", "has", "no", "other", "association", "with", "equipments", "IP", "is", "also", "removed", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L341-L371
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.associate_ipv6
def associate_ipv6(self, id_equip, id_ipv6): """Associates an IPv6 to a equipament. :param id_equip: Identifier of the equipment. Integer value and greater than zero. :param id_ipv6: Identifier of the ip. Integer value and greater than zero. :return: Dictionary with the following struc...
python
def associate_ipv6(self, id_equip, id_ipv6): """Associates an IPv6 to a equipament. :param id_equip: Identifier of the equipment. Integer value and greater than zero. :param id_ipv6: Identifier of the ip. Integer value and greater than zero. :return: Dictionary with the following struc...
[ "def", "associate_ipv6", "(", "self", ",", "id_equip", ",", "id_ipv6", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equip", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of equipment is invalid or was not informed.'", ")", "if", "not", "i...
Associates an IPv6 to a equipament. :param id_equip: Identifier of the equipment. Integer value and greater than zero. :param id_ipv6: Identifier of the ip. Integer value and greater than zero. :return: Dictionary with the following structure: {'ip_equipamento': {'id': < id_ip_do_e...
[ "Associates", "an", "IPv6", "to", "a", "equipament", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L404-L433
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.listar_por_tipo_ambiente
def listar_por_tipo_ambiente(self, id_tipo_equipamento, id_ambiente): """Lista os equipamentos de um tipo e que estão associados a um ambiente. :param id_tipo_equipamento: Identificador do tipo do equipamento. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seg...
python
def listar_por_tipo_ambiente(self, id_tipo_equipamento, id_ambiente): """Lista os equipamentos de um tipo e que estão associados a um ambiente. :param id_tipo_equipamento: Identificador do tipo do equipamento. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seg...
[ "def", "listar_por_tipo_ambiente", "(", "self", ",", "id_tipo_equipamento", ",", "id_ambiente", ")", ":", "if", "not", "is_valid_int_param", "(", "id_tipo_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do tipo do equipamento é inválido ou nã...
Lista os equipamentos de um tipo e que estão associados a um ambiente. :param id_tipo_equipamento: Identificador do tipo do equipamento. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'equipamento': [{'id': < id_equipament...
[ "Lista", "os", "equipamentos", "de", "um", "tipo", "e", "que", "estão", "associados", "a", "um", "ambiente", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L466-L505
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.listar_por_nome
def listar_por_nome(self, nome): """Obtém um equipamento a partir do seu nome. :param nome: Nome do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equi...
python
def listar_por_nome(self, nome): """Obtém um equipamento a partir do seu nome. :param nome: Nome do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equi...
[ "def", "listar_por_nome", "(", "self", ",", "nome", ")", ":", "if", "nome", "==", "''", "or", "nome", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'O nome do equipamento não foi informado.')", "", "url", "=", "'equipamento/nome/'", "+", "urllib", ...
Obtém um equipamento a partir do seu nome. :param nome: Nome do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equipamento': < id_tipo_equipamento >, ...
[ "Obtém", "um", "equipamento", "a", "partir", "do", "seu", "nome", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L507-L540
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.listar_por_id
def listar_por_id(self, id): """Obtém um equipamento a partir do seu identificador. :param id: ID do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equ...
python
def listar_por_id(self, id): """Obtém um equipamento a partir do seu identificador. :param id: ID do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equ...
[ "def", "listar_por_id", "(", "self", ",", "id", ")", ":", "if", "id", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'O id do equipamento não foi informado.')", "", "url", "=", "'equipamento/id/'", "+", "urllib", ".", "quote", "(", "id", ")", "+",...
Obtém um equipamento a partir do seu identificador. :param id: ID do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equipamento': < id_tipo_equipamento >, ...
[ "Obtém", "um", "equipamento", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L542-L575
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.list_all
def list_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLE...
python
def list_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLE...
[ "def", "list_all", "(", "self", ")", ":", "url", "=", "'equipamento/list/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", "(", "code", ",", "xml", ")" ]
Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to gene...
[ "Return", "all", "equipments", "in", "database" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L577-L594
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.get_all
def get_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLErr...
python
def get_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLErr...
[ "def", "get_all", "(", "self", ")", ":", "url", "=", "'equipment/all'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", "(", "code", ",", "xml", ")" ]
Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to gener...
[ "Return", "all", "equipments", "in", "database" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L596-L612
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.remover
def remover(self, id_equipamento): """Remove um equipamento a partir do seu identificador. Além de remover o equipamento, a API também remove: - O relacionamento do equipamento com os tipos de acessos. - O relacionamento do equipamento com os roteiros. - O relaciona...
python
def remover(self, id_equipamento): """Remove um equipamento a partir do seu identificador. Além de remover o equipamento, a API também remove: - O relacionamento do equipamento com os tipos de acessos. - O relacionamento do equipamento com os roteiros. - O relaciona...
[ "def", "remover", "(", "self", ",", "id_equipamento", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do equipamento é inválido ou não foi informado.')", "", "url", "=", "'equipamento/...
Remove um equipamento a partir do seu identificador. Além de remover o equipamento, a API também remove: - O relacionamento do equipamento com os tipos de acessos. - O relacionamento do equipamento com os roteiros. - O relacionamento do equipamento com os IPs. -...
[ "Remove", "um", "equipamento", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L614-L643
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.associar_grupo
def associar_grupo(self, id_equipamento, id_grupo_equipamento): """Associa um equipamento a um grupo. :param id_equipamento: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equ...
python
def associar_grupo(self, id_equipamento, id_grupo_equipamento): """Associa um equipamento a um grupo. :param id_equipamento: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equ...
[ "def", "associar_grupo", "(", "self", ",", "id_equipamento", ",", "id_grupo_equipamento", ")", ":", "equip_map", "=", "dict", "(", ")", "equip_map", "[", "'id_grupo'", "]", "=", "id_grupo_equipamento", "equip_map", "[", "'id_equipamento'", "]", "=", "id_equipament...
Associa um equipamento a um grupo. :param id_equipamento: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipamento_grupo':{'id': < id_equip_do_grupo >}} :raise GrupoEquipam...
[ "Associa", "um", "equipamento", "a", "um", "grupo", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L645-L669
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.remover_grupo
def remover_grupo(self, id_equipamento, id_grupo): """Remove a associação de um equipamento com um grupo de equipamento. :param id_equipamento: Identificador do equipamento. :param id_grupo: Identificador do grupo de equipamento. :return: None :raise EquipamentoGrupoNaoExisteE...
python
def remover_grupo(self, id_equipamento, id_grupo): """Remove a associação de um equipamento com um grupo de equipamento. :param id_equipamento: Identificador do equipamento. :param id_grupo: Identificador do grupo de equipamento. :return: None :raise EquipamentoGrupoNaoExisteE...
[ "def", "remover_grupo", "(", "self", ",", "id_equipamento", ",", "id_grupo", ")", ":", "if", "not", "is_valid_int_param", "(", "id_equipamento", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do equipamento é inválido ou não foi informado.')", "", "if...
Remove a associação de um equipamento com um grupo de equipamento. :param id_equipamento: Identificador do equipamento. :param id_grupo: Identificador do grupo de equipamento. :return: None :raise EquipamentoGrupoNaoExisteError: Associação entre grupo e equipamento não cadastrada. ...
[ "Remove", "a", "associação", "de", "um", "equipamento", "com", "um", "grupo", "de", "equipamento", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L671-L700