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/Equipamento.py
Equipamento.list_by_group
def list_by_group(self, id_egroup): """Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equipaments': [{'nome': < nam...
python
def list_by_group(self, id_egroup): """Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equipaments': [{'nome': < nam...
[ "def", "list_by_group", "(", "self", ",", "id_egroup", ")", ":", "if", "id_egroup", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Group Equipament is invalid or was not informed.'", ")", "url", "=", "'equipment/group/'", "+", "str", "(",...
Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equipaments': [{'nome': < name_equipament >, 'grupos': < id_group >, ...
[ "Search", "Group", "Equipment", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L702-L733
globocom/GloboNetworkAPI-client-python
networkapiclient/Equipamento.py
Equipamento.get_ips_by_equipment_and_environment
def get_ips_by_equipment_and_environment(self, equip_nome, id_ambiente): """Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equi...
python
def get_ips_by_equipment_and_environment(self, equip_nome, id_ambiente): """Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equi...
[ "def", "get_ips_by_equipment_and_environment", "(", "self", ",", "equip_nome", ",", "id_ambiente", ")", ":", "if", "id_ambiente", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'The environment id is invalid or was not informed.'", ")", "url", "=", "'equipmen...
Search Group Equipment from by the identifier. :param id_egroup: Identifier of the Group Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'equipaments': [{'nome': < name_equipament >, 'grupos': < id_group >, ...
[ "Search", "Group", "Equipment", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Equipamento.py#L735-L766
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiGenericClient.py
ApiGenericClient.get
def get(self, uri): """ Sends a GET request. @param uri: Uri of Service API. @param data: Requesting Data. Default: None @raise NetworkAPIClientError: Client failed to access the API. """ request = None try: request = reques...
python
def get(self, uri): """ Sends a GET request. @param uri: Uri of Service API. @param data: Requesting Data. Default: None @raise NetworkAPIClientError: Client failed to access the API. """ request = None try: request = reques...
[ "def", "get", "(", "self", ",", "uri", ")", ":", "request", "=", "None", "try", ":", "request", "=", "requests", ".", "get", "(", "self", ".", "_url", "(", "uri", ")", ",", "auth", "=", "self", ".", "_auth_basic", "(", ")", ",", "headers", "=", ...
Sends a GET request. @param uri: Uri of Service API. @param data: Requesting Data. Default: None @raise NetworkAPIClientError: Client failed to access the API.
[ "Sends", "a", "GET", "request", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L54-L96
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiGenericClient.py
ApiGenericClient._parse
def _parse(self, content): """ Parse data request to data from python. @param content: Context of request. @raise ParseError: """ if content: stream = BytesIO(str(content)) data = json.loads(stream.getvalue()) return dat...
python
def _parse(self, content): """ Parse data request to data from python. @param content: Context of request. @raise ParseError: """ if content: stream = BytesIO(str(content)) data = json.loads(stream.getvalue()) return dat...
[ "def", "_parse", "(", "self", ",", "content", ")", ":", "if", "content", ":", "stream", "=", "BytesIO", "(", "str", "(", "content", ")", ")", "data", "=", "json", ".", "loads", "(", "stream", ".", "getvalue", "(", ")", ")", "return", "data" ]
Parse data request to data from python. @param content: Context of request. @raise ParseError:
[ "Parse", "data", "request", "to", "data", "from", "python", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L233-L246
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiGenericClient.py
ApiGenericClient.prepare_url
def prepare_url(self, uri, kwargs): """Convert dict for URL params """ params = dict() for key in kwargs: if key in ('include', 'exclude', 'fields'): params.update({ key: ','.join(kwargs.get(key)) }) elif key in ...
python
def prepare_url(self, uri, kwargs): """Convert dict for URL params """ params = dict() for key in kwargs: if key in ('include', 'exclude', 'fields'): params.update({ key: ','.join(kwargs.get(key)) }) elif key in ...
[ "def", "prepare_url", "(", "self", ",", "uri", ",", "kwargs", ")", ":", "params", "=", "dict", "(", ")", "for", "key", "in", "kwargs", ":", "if", "key", "in", "(", "'include'", ",", "'exclude'", ",", "'fields'", ")", ":", "params", ".", "update", "...
Convert dict for URL params
[ "Convert", "dict", "for", "URL", "params" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiGenericClient.py#L270-L288
globocom/GloboNetworkAPI-client-python
networkapiclient/Rack.py
Rack.insert_rack
def insert_rack( self, number, name, mac_address_sw1, mac_address_sw2, mac_address_ilo, id_sw1, id_sw2, id_ilo): """Create new Rack :param number: Number of Rack :return: Following diction...
python
def insert_rack( self, number, name, mac_address_sw1, mac_address_sw2, mac_address_ilo, id_sw1, id_sw2, id_ilo): """Create new Rack :param number: Number of Rack :return: Following diction...
[ "def", "insert_rack", "(", "self", ",", "number", ",", "name", ",", "mac_address_sw1", ",", "mac_address_sw2", ",", "mac_address_ilo", ",", "id_sw1", ",", "id_sw2", ",", "id_ilo", ")", ":", "if", "not", "is_valid_int_param", "(", "number", ")", ":", "raise",...
Create new Rack :param number: Number of Rack :return: Following dictionary: :: {'rack': {'id': < id_rack >, 'num_rack': < num_rack >, 'name_rack': < name_rack >, 'mac_sw1': < mac_sw1 >, 'mac_sw2': < mac_sw2 >, 'mac_ilo': < mac_ilo >, ...
[ "Create", "new", "Rack", ":", "param", "number", ":", "Number", "of", "Rack", ":", "return", ":", "Following", "dictionary", ":", "::", "{", "rack", ":", "{", "id", ":", "<", "id_rack", ">", "num_rack", ":", "<", "num_rack", ">", "name_rack", ":", "<...
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Rack.py#L38-L82
globocom/GloboNetworkAPI-client-python
networkapiclient/Rack.py
Rack.remover
def remover(self, id_rack): """Remove Rack by the identifier. :param id_rack: Identifier of the Rack. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Rack is null and invalid. :raise RackNaoExisteError: Rack not registered. ...
python
def remover(self, id_rack): """Remove Rack by the identifier. :param id_rack: Identifier of the Rack. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Rack is null and invalid. :raise RackNaoExisteError: Rack not registered. ...
[ "def", "remover", "(", "self", ",", "id_rack", ")", ":", "if", "not", "is_valid_int_param", "(", "id_rack", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Rack is invalid or was not informed.'", ")", "url", "=", "'rack/'", "+", "str", "(", "...
Remove Rack by the identifier. :param id_rack: Identifier of the Rack. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Rack is null and invalid. :raise RackNaoExisteError: Rack not registered. :raise RackError: Rack is associa...
[ "Remove", "Rack", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Rack.py#L168-L189
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.listar
def listar(self, id_divisao=None, id_ambiente_logico=None): """Lista os ambientes filtrados conforme parâmetros informados. Se os dois parâmetros têm o valor None então retorna todos os ambientes. Se o id_divisao é diferente de None então retorna os ambientes filtrados pelo valor de id_...
python
def listar(self, id_divisao=None, id_ambiente_logico=None): """Lista os ambientes filtrados conforme parâmetros informados. Se os dois parâmetros têm o valor None então retorna todos os ambientes. Se o id_divisao é diferente de None então retorna os ambientes filtrados pelo valor de id_...
[ "def", "listar", "(", "self", ",", "id_divisao", "=", "None", ",", "id_ambiente_logico", "=", "None", ")", ":", "url", "=", "'ambiente/'", "if", "is_valid_int_param", "(", "id_divisao", ")", "and", "not", "is_valid_int_param", "(", "id_ambiente_logico", ")", "...
Lista os ambientes filtrados conforme parâmetros informados. Se os dois parâmetros têm o valor None então retorna todos os ambientes. Se o id_divisao é diferente de None então retorna os ambientes filtrados pelo valor de id_divisao. Se o id_divisao e id_ambiente_logico são diferentes de...
[ "Lista", "os", "ambientes", "filtrados", "conforme", "parâmetros", "informados", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L69-L114
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.buscar_por_equipamento
def buscar_por_equipamento(self, nome_equipamento, ip_equipamento): """Obtém um ambiente a partir do ip e nome de um equipamento. :param nome_equipamento: Nome do equipamento. :param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX. :return: Dicionário com a seguinte estrut...
python
def buscar_por_equipamento(self, nome_equipamento, ip_equipamento): """Obtém um ambiente a partir do ip e nome de um equipamento. :param nome_equipamento: Nome do equipamento. :param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX. :return: Dicionário com a seguinte estrut...
[ "def", "buscar_por_equipamento", "(", "self", ",", "nome_equipamento", ",", "ip_equipamento", ")", ":", "if", "nome_equipamento", "==", "''", "or", "nome_equipamento", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'O nome do equipamento não foi informado.')"...
Obtém um ambiente a partir do ip e nome de um equipamento. :param nome_equipamento: Nome do equipamento. :param ip_equipamento: IP do equipamento no formato XXX.XXX.XXX.XXX. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, ...
[ "Obtém", "um", "ambiente", "a", "partir", "do", "ip", "e", "nome", "de", "um", "equipamento", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L116-L158
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.buscar_por_id
def buscar_por_id(self, id_ambiente): """Obtém um ambiente a partir da chave primária (identificador). :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, ...
python
def buscar_por_id(self, id_ambiente): """Obtém um ambiente a partir da chave primária (identificador). :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, ...
[ "def", "buscar_por_id", "(", "self", ",", "id_ambiente", ")", ":", "if", "not", "is_valid_int_param", "(", "id_ambiente", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do ambiente é inválido ou não foi informado.')", "", "url", "=", "'environment/id/...
Obtém um ambiente a partir da chave primária (identificador). :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, 'id_divisao': < id_divisao >, '...
[ "Obtém", "um", "ambiente", "a", "partir", "da", "chave", "primária", "(", "identificador", ")", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L160-L197
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.buscar_healthcheck_por_id
def buscar_healthcheck_por_id(self, id_healthcheck): """Get HealthCheck by id. :param id_healthcheck: HealthCheck ID. :return: Following dictionary: :: {'healthcheck_expect': {'match_list': < match_list >, 'expect_string': < expect_string >, 'id'...
python
def buscar_healthcheck_por_id(self, id_healthcheck): """Get HealthCheck by id. :param id_healthcheck: HealthCheck ID. :return: Following dictionary: :: {'healthcheck_expect': {'match_list': < match_list >, 'expect_string': < expect_string >, 'id'...
[ "def", "buscar_healthcheck_por_id", "(", "self", ",", "id_healthcheck", ")", ":", "if", "not", "is_valid_int_param", "(", "id_healthcheck", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do healthcheck é inválido ou não foi informado.')", "", "url", "="...
Get HealthCheck by id. :param id_healthcheck: HealthCheck ID. :return: Following dictionary: :: {'healthcheck_expect': {'match_list': < match_list >, 'expect_string': < expect_string >, 'id': < id >, 'ambiente': < ambiente >}} :rais...
[ "Get", "HealthCheck", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L199-L226
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.listar_por_equip
def listar_por_equip(self, equip_id): """Lista todos os ambientes por equipamento especifico. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, 'id_divisao': < id_divisao >, 'nome_divisao': <...
python
def listar_por_equip(self, equip_id): """Lista todos os ambientes por equipamento especifico. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, 'id_divisao': < id_divisao >, 'nome_divisao': <...
[ "def", "listar_por_equip", "(", "self", ",", "equip_id", ")", ":", "if", "equip_id", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'O id do equipamento não foi informado.')", "", "url", "=", "'ambiente/equip/'", "+", "str", "(", "equip_id", ")", "+",...
Lista todos os ambientes por equipamento especifico. :return: Dicionário com a seguinte estrutura: :: {'ambiente': {'id': < id_ambiente >, 'link': < link >, 'id_divisao': < id_divisao >, 'nome_divisao': < nome_divisao >, 'id_ambiente_logico'...
[ "Lista", "todos", "os", "ambientes", "por", "equipamento", "especifico", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L228-L259
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.listar_healthcheck_expect
def listar_healthcheck_expect(self, id_ambiente): """Lista os healthcheck_expect´s de um ambiente. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'healthcheck_expect': [{'id': < id_healthcheck_expect >, 'expec...
python
def listar_healthcheck_expect(self, id_ambiente): """Lista os healthcheck_expect´s de um ambiente. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'healthcheck_expect': [{'id': < id_healthcheck_expect >, 'expec...
[ "def", "listar_healthcheck_expect", "(", "self", ",", "id_ambiente", ")", ":", "if", "not", "is_valid_int_param", "(", "id_ambiente", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do ambiente é inválido ou não foi informado.')", "", "url", "=", "'hea...
Lista os healthcheck_expect´s de um ambiente. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'healthcheck_expect': [{'id': < id_healthcheck_expect >, 'expect_string': < expect_string >, 'match_list': < ma...
[ "Lista", "os", "healthcheck_expect´s", "de", "um", "ambiente", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L261-L290
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.add_healthcheck_expect
def add_healthcheck_expect(self, id_ambiente, expect_string, match_list): """Insere um novo healthckeck_expect e retorna o seu identificador. :param expect_string: expect_string. :param id_ambiente: Identificador do ambiente lógico. :param match_list: match list. :return: Dicio...
python
def add_healthcheck_expect(self, id_ambiente, expect_string, match_list): """Insere um novo healthckeck_expect e retorna o seu identificador. :param expect_string: expect_string. :param id_ambiente: Identificador do ambiente lógico. :param match_list: match list. :return: Dicio...
[ "def", "add_healthcheck_expect", "(", "self", ",", "id_ambiente", ",", "expect_string", ",", "match_list", ")", ":", "healthcheck_map", "=", "dict", "(", ")", "healthcheck_map", "[", "'id_ambiente'", "]", "=", "id_ambiente", "healthcheck_map", "[", "'expect_string'"...
Insere um novo healthckeck_expect e retorna o seu identificador. :param expect_string: expect_string. :param id_ambiente: Identificador do ambiente lógico. :param match_list: match list. :return: Dicionário com a seguinte estrutura: {'healthcheck_expect': {'id': < id >}} :rais...
[ "Insere", "um", "novo", "healthckeck_expect", "e", "retorna", "o", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L292-L316
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.inserir
def inserir( self, id_grupo_l3, id_ambiente_logico, id_divisao, link, id_filter=None, acl_path=None, ipv4_template=None, ipv6_template=None, min_num_vlan_1=None, max_num_vlan_1=None, ...
python
def inserir( self, id_grupo_l3, id_ambiente_logico, id_divisao, link, id_filter=None, acl_path=None, ipv4_template=None, ipv6_template=None, min_num_vlan_1=None, max_num_vlan_1=None, ...
[ "def", "inserir", "(", "self", ",", "id_grupo_l3", ",", "id_ambiente_logico", ",", "id_divisao", ",", "link", ",", "id_filter", "=", "None", ",", "acl_path", "=", "None", ",", "ipv4_template", "=", "None", ",", "ipv6_template", "=", "None", ",", "min_num_vla...
Insere um novo ambiente e retorna o seu identificador. :param id_grupo_l3: Identificador do grupo layer 3. :param id_ambiente_logico: Identificador do ambiente lógico. :param id_divisao: Identificador da divisão data center. :param id_filter: Filter identifier. :param link: Link...
[ "Insere", "um", "novo", "ambiente", "e", "retorna", "o", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L318-L379
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.insert_with_ip_range
def insert_with_ip_range( self, id_l3_group, id_logical_environment, id_division, id_ip_config, link, id_filter=None): """Insert new environment with ip config and returns your id. :param id_l3_group: Layer 3 Group ID. ...
python
def insert_with_ip_range( self, id_l3_group, id_logical_environment, id_division, id_ip_config, link, id_filter=None): """Insert new environment with ip config and returns your id. :param id_l3_group: Layer 3 Group ID. ...
[ "def", "insert_with_ip_range", "(", "self", ",", "id_l3_group", ",", "id_logical_environment", ",", "id_division", ",", "id_ip_config", ",", "link", ",", "id_filter", "=", "None", ")", ":", "environment_map", "=", "dict", "(", ")", "environment_map", "[", "'id_g...
Insert new environment with ip config and returns your id. :param id_l3_group: Layer 3 Group ID. :param id_logical_environment: Logical Environment ID. :param id_division: Data Center Division ID. :param id_filter: Filter identifier. :param id_ip_config: IP Configuration ID. ...
[ "Insert", "new", "environment", "with", "ip", "config", "and", "returns", "your", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L381-L421
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.add_ip_range
def add_ip_range(self, id_environment, id_ip_config): """Makes relationship of environment with ip config and returns your id. :param id_environment: Environment ID. :param id_ip_config: IP Configuration ID. :return: Following dictionary: {'config_do_ambiente': {'id_config_do_...
python
def add_ip_range(self, id_environment, id_ip_config): """Makes relationship of environment with ip config and returns your id. :param id_environment: Environment ID. :param id_ip_config: IP Configuration ID. :return: Following dictionary: {'config_do_ambiente': {'id_config_do_...
[ "def", "add_ip_range", "(", "self", ",", "id_environment", ",", "id_ip_config", ")", ":", "environment_map", "=", "dict", "(", ")", "environment_map", "[", "'id_environment'", "]", "=", "id_environment", "environment_map", "[", "'id_ip_config'", "]", "=", "id_ip_c...
Makes relationship of environment with ip config and returns your id. :param id_environment: Environment ID. :param id_ip_config: IP Configuration ID. :return: Following dictionary: {'config_do_ambiente': {'id_config_do_ambiente': < id_config_do_ambiente >}} :raise InvalidPar...
[ "Makes", "relationship", "of", "environment", "with", "ip", "config", "and", "returns", "your", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L423-L446
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.alterar
def alterar( self, id_ambiente, id_grupo_l3, id_ambiente_logico, id_divisao, link, id_filter=None, acl_path=None, ipv4_template=None, ipv6_template=None, min_num_vlan_1=None, m...
python
def alterar( self, id_ambiente, id_grupo_l3, id_ambiente_logico, id_divisao, link, id_filter=None, acl_path=None, ipv4_template=None, ipv6_template=None, min_num_vlan_1=None, m...
[ "def", "alterar", "(", "self", ",", "id_ambiente", ",", "id_grupo_l3", ",", "id_ambiente_logico", ",", "id_divisao", ",", "link", ",", "id_filter", "=", "None", ",", "acl_path", "=", "None", ",", "ipv4_template", "=", "None", ",", "ipv6_template", "=", "None...
Altera os dados de um ambiente a partir do seu identificador. :param id_ambiente: Identificador do ambiente. :param id_grupo_l3: Identificador do grupo layer 3. :param id_ambiente_logico: Identificador do ambiente lógico. :param id_divisao: Identificador da divisão data center. ...
[ "Altera", "os", "dados", "de", "um", "ambiente", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L448-L515
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.add_expect_string_healthcheck
def add_expect_string_healthcheck(self, expect_string): """Inserts a new healthckeck_expect with only expect_string. :param expect_string: expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': {'id': < id >}} :raise InvalidPa...
python
def add_expect_string_healthcheck(self, expect_string): """Inserts a new healthckeck_expect with only expect_string. :param expect_string: expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': {'id': < id >}} :raise InvalidPa...
[ "def", "add_expect_string_healthcheck", "(", "self", ",", "expect_string", ")", ":", "healthcheck_map", "=", "dict", "(", ")", "healthcheck_map", "[", "'expect_string'", "]", "=", "expect_string", "url", "=", "'healthcheckexpect/add/expect_string/'", "code", ",", "xml...
Inserts a new healthckeck_expect with only expect_string. :param expect_string: expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': {'id': < id >}} :raise InvalidParameterError: The value of expect_string is invalid. :raise...
[ "Inserts", "a", "new", "healthckeck_expect", "with", "only", "expect_string", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L541-L567
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.listar_healtchcheck_expect_distinct
def listar_healtchcheck_expect_distinct(self): """Get all expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': [ 'expect_string': < expect_string >, ... demais healthcheck_expects ...]} :raise InvalidParamet...
python
def listar_healtchcheck_expect_distinct(self): """Get all expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': [ 'expect_string': < expect_string >, ... demais healthcheck_expects ...]} :raise InvalidParamet...
[ "def", "listar_healtchcheck_expect_distinct", "(", "self", ")", ":", "url", "=", "'healthcheckexpect/distinct/busca/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", "(", "code", ...
Get all expect_string. :return: Dictionary with the following structure: :: {'healthcheck_expect': [ 'expect_string': < expect_string >, ... demais healthcheck_expects ...]} :raise InvalidParameterError: Identifier is null and invalid. :raise Da...
[ "Get", "all", "expect_string", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L569-L590
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.list_acl_path
def list_acl_path(self): """Get all distinct acl paths. :return: Dictionary with the following structure: :: {'acl_paths': [ < acl_path >, ... ]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkap...
python
def list_acl_path(self): """Get all distinct acl paths. :return: Dictionary with the following structure: :: {'acl_paths': [ < acl_path >, ... ]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkap...
[ "def", "list_acl_path", "(", "self", ")", ":", "url", "=", "'environment/acl_path/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", "(", "code", ",", "xml", ")" ]
Get all distinct acl paths. :return: Dictionary with the following structure: :: {'acl_paths': [ < acl_path >, ... ]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML respons...
[ "Get", "all", "distinct", "acl", "paths", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L592-L613
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.set_template
def set_template(self, id_environment, name, network): """Set template value. If id_environment = 0, set '' to all environments related with the template name. :param id_environment: Environment Identifier. :param name: Template Name. :param network: IPv4 or IPv6. :return: None...
python
def set_template(self, id_environment, name, network): """Set template value. If id_environment = 0, set '' to all environments related with the template name. :param id_environment: Environment Identifier. :param name: Template Name. :param network: IPv4 or IPv6. :return: None...
[ "def", "set_template", "(", "self", ",", "id_environment", ",", "name", ",", "network", ")", ":", "url", "=", "'environment/set_template/'", "+", "str", "(", "id_environment", ")", "+", "'/'", "environment_map", "=", "dict", "(", ")", "environment_map", "[", ...
Set template value. If id_environment = 0, set '' to all environments related with the template name. :param id_environment: Environment Identifier. :param name: Template Name. :param network: IPv4 or IPv6. :return: None :raise InvalidParameterError: Invalid param. :ra...
[ "Set", "template", "value", ".", "If", "id_environment", "=", "0", "set", "to", "all", "environments", "related", "with", "the", "template", "name", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L615-L638
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.get_environment_template
def get_environment_template(self, name, network): """Get environments by template name :param name: Template name. :param network: IPv4 or IPv6. :return: Following dictionary: :: {'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] } :ra...
python
def get_environment_template(self, name, network): """Get environments by template name :param name: Template name. :param network: IPv4 or IPv6. :return: Following dictionary: :: {'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] } :ra...
[ "def", "get_environment_template", "(", "self", ",", "name", ",", "network", ")", ":", "url", "=", "'environment/get_env_template/'", "map_dict", "=", "dict", "(", ")", "map_dict", "[", "'name'", "]", "=", "name", "map_dict", "[", "'network'", "]", "=", "net...
Get environments by template name :param name: Template name. :param network: IPv4 or IPv6. :return: Following dictionary: :: {'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] } :raise InvalidParameterError: Invalid param. :raise DataB...
[ "Get", "environments", "by", "template", "name" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L640-L664
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.save_blocks
def save_blocks(self, id_env, blocks): """ Save blocks from environment :param id_env: Environment id :param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...] :return: None :raise AmbienteNaoExisteError: Ambiente não cadastrado. :raise I...
python
def save_blocks(self, id_env, blocks): """ Save blocks from environment :param id_env: Environment id :param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...] :return: None :raise AmbienteNaoExisteError: Ambiente não cadastrado. :raise I...
[ "def", "save_blocks", "(", "self", ",", "id_env", ",", "blocks", ")", ":", "url", "=", "'environment/save_blocks/'", "map_dict", "=", "dict", "(", ")", "map_dict", "[", "'id_env'", "]", "=", "id_env", "map_dict", "[", "'blocks'", "]", "=", "blocks", "code"...
Save blocks from environment :param id_env: Environment id :param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...] :return: None :raise AmbienteNaoExisteError: Ambiente não cadastrado. :raise InvalidValueError: Invalid parameter. :raise UserNot...
[ "Save", "blocks", "from", "environment" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L666-L691
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.get_rule_by_pk
def get_rule_by_pk(self, id_rule): """ Get a rule by its identifier :param id_rule: Rule identifier. :return: Seguinte estrutura :: { 'rule': {'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'n...
python
def get_rule_by_pk(self, id_rule): """ Get a rule by its identifier :param id_rule: Rule identifier. :return: Seguinte estrutura :: { 'rule': {'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'n...
[ "def", "get_rule_by_pk", "(", "self", ",", "id_rule", ")", ":", "url", "=", "'rule/get_by_id/'", "+", "str", "(", "id_rule", ")", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "resp...
Get a rule by its identifier :param id_rule: Rule identifier. :return: Seguinte estrutura :: { 'rule': {'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'custom': < custom > }} ...
[ "Get", "a", "rule", "by", "its", "identifier" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L774-L798
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.save_rule
def save_rule(self, name, id_env, contents, blocks_id): """ Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0...
python
def save_rule(self, name, id_env, contents, blocks_id): """ Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0...
[ "def", "save_rule", "(", "self", ",", "name", ",", "id_env", ",", "contents", ",", "blocks_id", ")", ":", "url", "=", "'rule/save/'", "map_dict", "=", "dict", "(", ")", "map_dict", "[", "'name'", "]", "=", "name", "map_dict", "[", "'id_env'", "]", "=",...
Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...] :return: None ...
[ "Save", "an", "environment", "rule" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L800-L829
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.update_rule
def update_rule(self, name, id_env, contents, blocks_id, id_rule): """ Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blo...
python
def update_rule(self, name, id_env, contents, blocks_id, id_rule): """ Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blo...
[ "def", "update_rule", "(", "self", ",", "name", ",", "id_env", ",", "contents", ",", "blocks_id", ",", "id_rule", ")", ":", "url", "=", "'rule/update/'", "map_dict", "=", "dict", "(", ")", "map_dict", "[", "'name'", "]", "=", "name", "map_dict", "[", "...
Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...] :param id_rule: Ru...
[ "Save", "an", "environment", "rule" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L831-L865
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.get_all_rules
def get_all_rules(self, id_env): """Save an environment rule :param id_env: Environment id :return: Estrutura: :: { 'rules': [{'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'c...
python
def get_all_rules(self, id_env): """Save an environment rule :param id_env: Environment id :return: Estrutura: :: { 'rules': [{'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'c...
[ "def", "get_all_rules", "(", "self", ",", "id_env", ")", ":", "url", "=", "'rule/all/'", "+", "str", "(", "id_env", ")", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", "response", ...
Save an environment rule :param id_env: Environment id :return: Estrutura: :: { 'rules': [{'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'custom': < custom > },... ]} :raise ...
[ "Save", "an", "environment", "rule" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L888-L911
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.configuration_save
def configuration_save( self, id_environment, network, prefix, ip_version, network_type): """ Add new prefix configuration :param id_environment: Identifier of the Environment. Integer value and greater than zero. :...
python
def configuration_save( self, id_environment, network, prefix, ip_version, network_type): """ Add new prefix configuration :param id_environment: Identifier of the Environment. Integer value and greater than zero. :...
[ "def", "configuration_save", "(", "self", ",", "id_environment", ",", "network", ",", "prefix", ",", "ip_version", ",", "network_type", ")", ":", "network_map", "=", "dict", "(", ")", "network_map", "[", "'id_environment'", "]", "=", "id_environment", "network_m...
Add new prefix configuration :param id_environment: Identifier of the Environment. Integer value and greater than zero. :param network: Network Ipv4 or Ipv6. :param prefix: Prefix 0-32 to Ipv4 or 0-128 to Ipv6. :param ip_version: v4 to IPv4 or v6 to IPv6 :param network_type: typ...
[ "Add", "new", "prefix", "configuration" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L913-L955
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.configuration_list_all
def configuration_list_all(self, environment_id): """ List all prefix configurations by environment in DB :return: Following dictionary: :: {'lists_configuration': [{ 'id': <id_ipconfig>, 'subnet': <subnet>, 'type': <type>, '...
python
def configuration_list_all(self, environment_id): """ List all prefix configurations by environment in DB :return: Following dictionary: :: {'lists_configuration': [{ 'id': <id_ipconfig>, 'subnet': <subnet>, 'type': <type>, '...
[ "def", "configuration_list_all", "(", "self", ",", "environment_id", ")", ":", "data", "=", "dict", "(", ")", "data", "[", "\"environment_id\"", "]", "=", "environment_id", "url", "=", "(", "\"environment/configuration/list/%(environment_id)s/\"", "%", "data", ")", ...
List all prefix configurations by environment in DB :return: Following dictionary: :: {'lists_configuration': [{ 'id': <id_ipconfig>, 'subnet': <subnet>, 'type': <type>, 'new_prefix': <new_prefix>, }, ... ]} :raise Inva...
[ "List", "all", "prefix", "configurations", "by", "environment", "in", "DB" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L957-L986
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.configuration_remove
def configuration_remove(self, environment_id, configuration_id): """ Remove Prefix Configuration :return: None :raise InvalidValueError: Invalid Id for Environment or IpConfig. :raise IPConfigNotFoundError: Ipconfig not resgistred. :raise AmbienteNotFoundError: Environ...
python
def configuration_remove(self, environment_id, configuration_id): """ Remove Prefix Configuration :return: None :raise InvalidValueError: Invalid Id for Environment or IpConfig. :raise IPConfigNotFoundError: Ipconfig not resgistred. :raise AmbienteNotFoundError: Environ...
[ "def", "configuration_remove", "(", "self", ",", "environment_id", ",", "configuration_id", ")", ":", "data", "=", "dict", "(", ")", "data", "[", "\"configuration_id\"", "]", "=", "configuration_id", "data", "[", "\"environment_id\"", "]", "=", "environment_id", ...
Remove Prefix Configuration :return: None :raise InvalidValueError: Invalid Id for Environment or IpConfig. :raise IPConfigNotFoundError: Ipconfig not resgistred. :raise AmbienteNotFoundError: Environment not registered. :raise DataBaseError: Failed into networkapi access data ...
[ "Remove", "Prefix", "Configuration" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L988-L1013
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.associate
def associate(self, environment_id, environment_vip_id): """Associate a news Environment on Environment VIP and returns its identifier. :param environment_id: Identifier of the Environment. Integer value and greater than zero. :param environment_vip_id: Identifier of the Environment VIP. Integ...
python
def associate(self, environment_id, environment_vip_id): """Associate a news Environment on Environment VIP and returns its identifier. :param environment_id: Identifier of the Environment. Integer value and greater than zero. :param environment_vip_id: Identifier of the Environment VIP. Integ...
[ "def", "associate", "(", "self", ",", "environment_id", ",", "environment_vip_id", ")", ":", "if", "not", "is_valid_int_param", "(", "environment_id", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Environment VIP is invalid or was not informed.'", ")...
Associate a news Environment on Environment VIP and returns its identifier. :param environment_id: Identifier of the Environment. Integer value and greater than zero. :param environment_vip_id: Identifier of the Environment VIP. Integer value and greater than zero. :return: Following dictionar...
[ "Associate", "a", "news", "Environment", "on", "Environment", "VIP", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L1015-L1048
globocom/GloboNetworkAPI-client-python
networkapiclient/Ambiente.py
Ambiente.get_related_environment_list
def get_related_environment_list(self, environment_vip_id): """Get all Environment by Environment Vip. :return: Following dictionary: :: {'ambiente': [{ 'id': <id_environment>, 'grupo_l3': <id_group_l3>, 'grupo_l3_name': <name_group_l3>, 'ambien...
python
def get_related_environment_list(self, environment_vip_id): """Get all Environment by Environment Vip. :return: Following dictionary: :: {'ambiente': [{ 'id': <id_environment>, 'grupo_l3': <id_group_l3>, 'grupo_l3_name': <name_group_l3>, 'ambien...
[ "def", "get_related_environment_list", "(", "self", ",", "environment_vip_id", ")", ":", "url", "=", "'environment/environmentvip/{}/'", ".", "format", "(", "environment_vip_id", ")", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ","...
Get all Environment by Environment Vip. :return: Following dictionary: :: {'ambiente': [{ 'id': <id_environment>, 'grupo_l3': <id_group_l3>, 'grupo_l3_name': <name_group_l3>, 'ambiente_logico': <id_logical_environment>, 'ambiente_logico_name...
[ "Get", "all", "Environment", "by", "Environment", "Vip", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Ambiente.py#L1085-L1113
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiEquipment.py
ApiEquipment.get_equipment
def get_equipment(self, **kwargs): """ Return list environments related with environment vip """ uri = 'api/v3/equipment/' uri = self.prepare_url(uri, kwargs) return super(ApiEquipment, self).get(uri)
python
def get_equipment(self, **kwargs): """ Return list environments related with environment vip """ uri = 'api/v3/equipment/' uri = self.prepare_url(uri, kwargs) return super(ApiEquipment, self).get(uri)
[ "def", "get_equipment", "(", "self", ",", "*", "*", "kwargs", ")", ":", "uri", "=", "'api/v3/equipment/'", "uri", "=", "self", ".", "prepare_url", "(", "uri", ",", "kwargs", ")", "return", "super", "(", "ApiEquipment", ",", "self", ")", ".", "get", "("...
Return list environments related with environment vip
[ "Return", "list", "environments", "related", "with", "environment", "vip" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L36-L44
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiEquipment.py
ApiEquipment.search
def search(self, **kwargs): """ Method to search equipments based on extends search. :param search: Dict containing QuerySets to find equipments. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. ...
python
def search(self, **kwargs): """ Method to search equipments based on extends search. :param search: Dict containing QuerySets to find equipments. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. ...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiEquipment", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/equipment/'", ",", "kwargs", ")", ")" ]
Method to search equipments based on extends search. :param search: Dict containing QuerySets to find equipments. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to ov...
[ "Method", "to", "search", "equipments", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L46-L59
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiEquipment.py
ApiEquipment.delete
def delete(self, ids): """ Method to delete equipments by their id's :param ids: Identifiers of equipments :return: None """ url = build_uri_with_ids('api/v3/equipment/%s/', ids) return super(ApiEquipment, self).delete(url)
python
def delete(self, ids): """ Method to delete equipments by their id's :param ids: Identifiers of equipments :return: None """ url = build_uri_with_ids('api/v3/equipment/%s/', ids) return super(ApiEquipment, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/equipment/%s/'", ",", "ids", ")", "return", "super", "(", "ApiEquipment", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete equipments by their id's :param ids: Identifiers of equipments :return: None
[ "Method", "to", "delete", "equipments", "by", "their", "id", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L75-L83
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiEquipment.py
ApiEquipment.create
def create(self, equipments): """ Method to create equipments :param equipments: List containing equipments desired to be created on database :return: None """ data = {'equipments': equipments} return super(ApiEquipment, self).post('api/v3/equipment/', data)
python
def create(self, equipments): """ Method to create equipments :param equipments: List containing equipments desired to be created on database :return: None """ data = {'equipments': equipments} return super(ApiEquipment, self).post('api/v3/equipment/', data)
[ "def", "create", "(", "self", ",", "equipments", ")", ":", "data", "=", "{", "'equipments'", ":", "equipments", "}", "return", "super", "(", "ApiEquipment", ",", "self", ")", ".", "post", "(", "'api/v3/equipment/'", ",", "data", ")" ]
Method to create equipments :param equipments: List containing equipments desired to be created on database :return: None
[ "Method", "to", "create", "equipments" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiEquipment.py#L99-L108
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPoolDeploy.py
ApiPoolDeploy.delete
def delete(self, ids): """ Method to undeploy pool's by their ids :param ids: Identifiers of deployed pool's :return: Empty Dict """ url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids) return super(ApiPoolDeploy, self).delete(url)
python
def delete(self, ids): """ Method to undeploy pool's by their ids :param ids: Identifiers of deployed pool's :return: Empty Dict """ url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids) return super(ApiPoolDeploy, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/pool/deploy/%s/'", ",", "ids", ")", "return", "super", "(", "ApiPoolDeploy", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to undeploy pool's by their ids :param ids: Identifiers of deployed pool's :return: Empty Dict
[ "Method", "to", "undeploy", "pool", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPoolDeploy.py#L36-L45
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiPoolDeploy.py
ApiPoolDeploy.create
def create(self, ids): """ Method to deploy pool's :param pools: Identifiers of pool's desired to be deployed :return: Empty Dict """ url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids) return super(ApiPoolDeploy, self).post(url)
python
def create(self, ids): """ Method to deploy pool's :param pools: Identifiers of pool's desired to be deployed :return: Empty Dict """ url = build_uri_with_ids('api/v3/pool/deploy/%s/', ids) return super(ApiPoolDeploy, self).post(url)
[ "def", "create", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/pool/deploy/%s/'", ",", "ids", ")", "return", "super", "(", "ApiPoolDeploy", ",", "self", ")", ".", "post", "(", "url", ")" ]
Method to deploy pool's :param pools: Identifiers of pool's desired to be deployed :return: Empty Dict
[ "Method", "to", "deploy", "pool", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiPoolDeploy.py#L62-L71
globocom/GloboNetworkAPI-client-python
networkapiclient/Vip.py
Vip.edit_reals
def edit_reals( self, id_vip, method_bal, reals, reals_prioritys, reals_weights, alter_priority=0): """Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals. :param...
python
def edit_reals( self, id_vip, method_bal, reals, reals_prioritys, reals_weights, alter_priority=0): """Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals. :param...
[ "def", "edit_reals", "(", "self", ",", "id_vip", ",", "method_bal", ",", "reals", ",", "reals_prioritys", ",", "reals_weights", ",", "alter_priority", "=", "0", ")", ":", "if", "not", "is_valid_int_param", "(", "id_vip", ")", ":", "raise", "InvalidParameterErr...
Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals. :param id_vip: Identifier of the VIP. Integer value and greater than zero. :param method_bal: method_bal. :param reals: List of reals. Ex: [{'real_name':'Teste1', 'real_ip':'10.10.10.1'...
[ "Execute", "the", "script", "gerador_vips", "several", "times", "with", "options", "-", "real", "-", "add", "and", "-", "del", "to", "adjust", "vip", "request", "reals", ".", ":", "param", "id_vip", ":", "Identifier", "of", "the", "VIP", ".", "Integer", ...
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Vip.py#L31-L83
globocom/GloboNetworkAPI-client-python
networkapiclient/Marca.py
Marca.inserir
def inserir(self, name): """Inserts a new Brand and returns its identifier :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'marca': {'id': < id_brand >}} :raise InvalidParameterE...
python
def inserir(self, name): """Inserts a new Brand and returns its identifier :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'marca': {'id': < id_brand >}} :raise InvalidParameterE...
[ "def", "inserir", "(", "self", ",", "name", ")", ":", "brand_map", "=", "dict", "(", ")", "brand_map", "[", "'name'", "]", "=", "name", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "'brand'", ":", "brand_map", "}", ",", "'POST'", ",", ...
Inserts a new Brand and returns its identifier :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'marca': {'id': < id_brand >}} :raise InvalidParameterError: Name is null and invalid. ...
[ "Inserts", "a", "new", "Brand", "and", "returns", "its", "identifier" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L50-L71
globocom/GloboNetworkAPI-client-python
networkapiclient/Marca.py
Marca.alterar
def alterar(self, id_brand, name): """Change Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: None :raise InvalidParameterError: ...
python
def alterar(self, id_brand, name): """Change Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: None :raise InvalidParameterError: ...
[ "def", "alterar", "(", "self", ",", "id_brand", ",", "name", ")", ":", "if", "not", "is_valid_int_param", "(", "id_brand", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Brand is invalid or was not informed.'", ")", "url", "=", "'brand/'", "+"...
Change Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: None :raise InvalidParameterError: The identifier of Brand or name is null and in...
[ "Change", "Brand", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L73-L99
globocom/GloboNetworkAPI-client-python
networkapiclient/Marca.py
Marca.remover
def remover(self, id_brand): """Remove Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Brand is null and invalid. :raise MarcaNaoExisteError: Brand not re...
python
def remover(self, id_brand): """Remove Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Brand is null and invalid. :raise MarcaNaoExisteError: Brand not re...
[ "def", "remover", "(", "self", ",", "id_brand", ")", ":", "if", "not", "is_valid_int_param", "(", "id_brand", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Brand is invalid or was not informed.'", ")", "url", "=", "'brand/'", "+", "str", "(",...
Remove Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Brand is null and invalid. :raise MarcaNaoExisteError: Brand not registered. :raise MarcaError: The...
[ "Remove", "Brand", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Marca.py#L101-L123
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.acl_remove_draft
def acl_remove_draft(self, id_vlan, type_acl): """ Remove Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanExce...
python
def acl_remove_draft(self, id_vlan, type_acl): """ Remove Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanExce...
[ "def", "acl_remove_draft", "(", "self", ",", "id_vlan", ",", "type_acl", ")", ":", "parameters", "=", "dict", "(", "id_vlan", "=", "id_vlan", ",", "type_acl", "=", "type_acl", ")", "uri", "=", "'api/vlan/acl/remove/draft/%(id_vlan)s/%(type_acl)s/'", "%", "paramete...
Remove Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanException: Invalid id for Vlan. :raise NetworkAPIException: Fai...
[ "Remove", "Acl", "draft", "by", "type" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L36-L54
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.acl_save_draft
def acl_save_draft(self, id_vlan, type_acl, content_draft): """ Save Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise Invali...
python
def acl_save_draft(self, id_vlan, type_acl, content_draft): """ Save Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise Invali...
[ "def", "acl_save_draft", "(", "self", ",", "id_vlan", ",", "type_acl", ",", "content_draft", ")", ":", "parameters", "=", "dict", "(", "id_vlan", "=", "id_vlan", ",", "type_acl", "=", "type_acl", ")", "data", "=", "dict", "(", "content_draft", "=", "conten...
Save Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanException: Invalid id for Vlan. :raise NetworkAPIException: Faile...
[ "Save", "Acl", "draft", "by", "type" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L56-L76
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.search
def search(self, **kwargs): """ Method to search vlan's based on extends search. :param search: Dict containing QuerySets to find vlan's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
python
def search(self, **kwargs): """ Method to search vlan's based on extends search. :param search: Dict containing QuerySets to find vlan's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiVlan", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/vlan/'", ",", "kwargs", ")", ")" ]
Method to search vlan's based on extends search. :param search: Dict containing QuerySets to find vlan's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
[ "Method", "to", "search", "vlan", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L78-L91
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.delete
def delete(self, ids): """ Method to delete vlan's by their ids :param ids: Identifiers of vlan's :return: None """ url = build_uri_with_ids('api/v3/vlan/%s/', ids) return super(ApiVlan, self).delete(url)
python
def delete(self, ids): """ Method to delete vlan's by their ids :param ids: Identifiers of vlan's :return: None """ url = build_uri_with_ids('api/v3/vlan/%s/', ids) return super(ApiVlan, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/vlan/%s/'", ",", "ids", ")", "return", "super", "(", "ApiVlan", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete vlan's by their ids :param ids: Identifiers of vlan's :return: None
[ "Method", "to", "delete", "vlan", "s", "by", "their", "ids" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L108-L117
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.update
def update(self, vlans): """ Method to update vlan's :param vlans: List containing vlan's desired to updated :return: None """ data = {'vlans': vlans} vlans_ids = [str(vlan.get('id')) for vlan in vlans] return super(ApiVlan, self).put('api/v3/vlan/%s/' ...
python
def update(self, vlans): """ Method to update vlan's :param vlans: List containing vlan's desired to updated :return: None """ data = {'vlans': vlans} vlans_ids = [str(vlan.get('id')) for vlan in vlans] return super(ApiVlan, self).put('api/v3/vlan/%s/' ...
[ "def", "update", "(", "self", ",", "vlans", ")", ":", "data", "=", "{", "'vlans'", ":", "vlans", "}", "vlans_ids", "=", "[", "str", "(", "vlan", ".", "get", "(", "'id'", ")", ")", "for", "vlan", "in", "vlans", "]", "return", "super", "(", "ApiVla...
Method to update vlan's :param vlans: List containing vlan's desired to updated :return: None
[ "Method", "to", "update", "vlan", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L119-L131
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVlan.py
ApiVlan.create
def create(self, vlans): """ Method to create vlan's :param vlans: List containing vlan's desired to be created on database :return: None """ data = {'vlans': vlans} return super(ApiVlan, self).post('api/v3/vlan/', data)
python
def create(self, vlans): """ Method to create vlan's :param vlans: List containing vlan's desired to be created on database :return: None """ data = {'vlans': vlans} return super(ApiVlan, self).post('api/v3/vlan/', data)
[ "def", "create", "(", "self", ",", "vlans", ")", ":", "data", "=", "{", "'vlans'", ":", "vlans", "}", "return", "super", "(", "ApiVlan", ",", "self", ")", ".", "post", "(", "'api/v3/vlan/'", ",", "data", ")" ]
Method to create vlan's :param vlans: List containing vlan's desired to be created on database :return: None
[ "Method", "to", "create", "vlan", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVlan.py#L133-L142
globocom/GloboNetworkAPI-client-python
networkapiclient/utils.py
is_valid_int_param
def is_valid_int_param(param): """Verifica se o parâmetro é um valor inteiro válido. :param param: Valor para ser validado. :return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário. """ if param is None: return False try: param = int(param) if ...
python
def is_valid_int_param(param): """Verifica se o parâmetro é um valor inteiro válido. :param param: Valor para ser validado. :return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário. """ if param is None: return False try: param = int(param) if ...
[ "def", "is_valid_int_param", "(", "param", ")", ":", "if", "param", "is", "None", ":", "return", "False", "try", ":", "param", "=", "int", "(", "param", ")", "if", "param", "<", "0", ":", "return", "False", "except", "(", "TypeError", ",", "ValueError"...
Verifica se o parâmetro é um valor inteiro válido. :param param: Valor para ser validado. :return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário.
[ "Verifica", "se", "o", "parâmetro", "é", "um", "valor", "inteiro", "válido", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L21-L36
globocom/GloboNetworkAPI-client-python
networkapiclient/utils.py
is_valid_ip
def is_valid_ip(address): """Verifica se address é um endereço ip válido. O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9. :param address: Endereço IP. :return: True se o parâmetro é um IP válido, ou False, caso contrário. """ if address is None...
python
def is_valid_ip(address): """Verifica se address é um endereço ip válido. O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9. :param address: Endereço IP. :return: True se o parâmetro é um IP válido, ou False, caso contrário. """ if address is None...
[ "def", "is_valid_ip", "(", "address", ")", ":", "if", "address", "is", "None", ":", "return", "False", "pattern", "=", "r'\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)...
Verifica se address é um endereço ip válido. O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9. :param address: Endereço IP. :return: True se o parâmetro é um IP válido, ou False, caso contrário.
[ "Verifica", "se", "address", "é", "um", "endereço", "ip", "válido", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L39-L51
globocom/GloboNetworkAPI-client-python
networkapiclient/utils.py
is_valid_version_ip
def is_valid_version_ip(param): """Checks if the parameter is a valid ip version value. :param param: Value to be validated. :return: True if the parameter has a valid ip version value, or False otherwise. """ if param is None: return False if param == IP_VERSION.IPv4[0] or param == I...
python
def is_valid_version_ip(param): """Checks if the parameter is a valid ip version value. :param param: Value to be validated. :return: True if the parameter has a valid ip version value, or False otherwise. """ if param is None: return False if param == IP_VERSION.IPv4[0] or param == I...
[ "def", "is_valid_version_ip", "(", "param", ")", ":", "if", "param", "is", "None", ":", "return", "False", "if", "param", "==", "IP_VERSION", ".", "IPv4", "[", "0", "]", "or", "param", "==", "IP_VERSION", ".", "IPv6", "[", "0", "]", ":", "return", "T...
Checks if the parameter is a valid ip version value. :param param: Value to be validated. :return: True if the parameter has a valid ip version value, or False otherwise.
[ "Checks", "if", "the", "parameter", "is", "a", "valid", "ip", "version", "value", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/utils.py#L77-L90
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.option_vip_by_environmentvip
def option_vip_by_environmentvip(self, environment_vip_id): """ List Option Vip by Environment Vip param environment_vip_id: Id of Environment Vip """ uri = 'api/v3/option-vip/environment-vip/%s/' % environment_vip_id return super(ApiVipRequest, self).get(uri)
python
def option_vip_by_environmentvip(self, environment_vip_id): """ List Option Vip by Environment Vip param environment_vip_id: Id of Environment Vip """ uri = 'api/v3/option-vip/environment-vip/%s/' % environment_vip_id return super(ApiVipRequest, self).get(uri)
[ "def", "option_vip_by_environmentvip", "(", "self", ",", "environment_vip_id", ")", ":", "uri", "=", "'api/v3/option-vip/environment-vip/%s/'", "%", "environment_vip_id", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "get", "(", "uri", ")" ]
List Option Vip by Environment Vip param environment_vip_id: Id of Environment Vip
[ "List", "Option", "Vip", "by", "Environment", "Vip" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L51-L60
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.get_vip_request_details
def get_vip_request_details(self, vip_request_id): """ Method to get details of vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/details/%s/' % vip_request_id return super(ApiVipRequest, self).get(uri)
python
def get_vip_request_details(self, vip_request_id): """ Method to get details of vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/details/%s/' % vip_request_id return super(ApiVipRequest, self).get(uri)
[ "def", "get_vip_request_details", "(", "self", ",", "vip_request_id", ")", ":", "uri", "=", "'api/v3/vip-request/details/%s/'", "%", "vip_request_id", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "get", "(", "uri", ")" ]
Method to get details of vip request param vip_request_id: vip_request id
[ "Method", "to", "get", "details", "of", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L62-L70
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.get_vip_request
def get_vip_request(self, vip_request_id): """ Method to get vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/%s/' % vip_request_id return super(ApiVipRequest, self).get(uri)
python
def get_vip_request(self, vip_request_id): """ Method to get vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/%s/' % vip_request_id return super(ApiVipRequest, self).get(uri)
[ "def", "get_vip_request", "(", "self", ",", "vip_request_id", ")", ":", "uri", "=", "'api/v3/vip-request/%s/'", "%", "vip_request_id", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "get", "(", "uri", ")" ]
Method to get vip request param vip_request_id: vip_request id
[ "Method", "to", "get", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L83-L91
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.search_vip_request
def search_vip_request(self, search): """ Method to list vip request param search: search """ uri = 'api/v3/vip-request/?%s' % urllib.urlencode({'search': search}) return super(ApiVipRequest, self).get(uri)
python
def search_vip_request(self, search): """ Method to list vip request param search: search """ uri = 'api/v3/vip-request/?%s' % urllib.urlencode({'search': search}) return super(ApiVipRequest, self).get(uri)
[ "def", "search_vip_request", "(", "self", ",", "search", ")", ":", "uri", "=", "'api/v3/vip-request/?%s'", "%", "urllib", ".", "urlencode", "(", "{", "'search'", ":", "search", "}", ")", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "get"...
Method to list vip request param search: search
[ "Method", "to", "list", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L93-L101
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.save_vip_request
def save_vip_request(self, vip_request): """ Method to save vip request param vip_request: vip_request object """ uri = 'api/v3/vip-request/' data = dict() data['vips'] = list() data['vips'].append(vip_request) return super(ApiVipRequest, self)....
python
def save_vip_request(self, vip_request): """ Method to save vip request param vip_request: vip_request object """ uri = 'api/v3/vip-request/' data = dict() data['vips'] = list() data['vips'].append(vip_request) return super(ApiVipRequest, self)....
[ "def", "save_vip_request", "(", "self", ",", "vip_request", ")", ":", "uri", "=", "'api/v3/vip-request/'", "data", "=", "dict", "(", ")", "data", "[", "'vips'", "]", "=", "list", "(", ")", "data", "[", "'vips'", "]", ".", "append", "(", "vip_request", ...
Method to save vip request param vip_request: vip_request object
[ "Method", "to", "save", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L103-L115
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.update_vip_request
def update_vip_request(self, vip_request, vip_request_id): """ Method to update vip request param vip_request: vip_request object param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/%s/' % vip_request_id data = dict() data['vips'] = list()...
python
def update_vip_request(self, vip_request, vip_request_id): """ Method to update vip request param vip_request: vip_request object param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/%s/' % vip_request_id data = dict() data['vips'] = list()...
[ "def", "update_vip_request", "(", "self", ",", "vip_request", ",", "vip_request_id", ")", ":", "uri", "=", "'api/v3/vip-request/%s/'", "%", "vip_request_id", "data", "=", "dict", "(", ")", "data", "[", "'vips'", "]", "=", "list", "(", ")", "data", "[", "'v...
Method to update vip request param vip_request: vip_request object param vip_request_id: vip_request id
[ "Method", "to", "update", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L117-L130
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.delete_vip_request
def delete_vip_request(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/%s/' % vip_request_ids return super(ApiVipRequest, self).delete(uri)
python
def delete_vip_request(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/%s/' % vip_request_ids return super(ApiVipRequest, self).delete(uri)
[ "def", "delete_vip_request", "(", "self", ",", "vip_request_ids", ")", ":", "uri", "=", "'api/v3/vip-request/%s/'", "%", "vip_request_ids", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "delete", "(", "uri", ")" ]
Method to delete vip request param vip_request_ids: vip_request ids
[ "Method", "to", "delete", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L132-L140
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.create_vip
def create_vip(self, vip_request_ids): """ Method to create vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRequest, self).post(uri)
python
def create_vip(self, vip_request_ids): """ Method to create vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRequest, self).post(uri)
[ "def", "create_vip", "(", "self", ",", "vip_request_ids", ")", ":", "uri", "=", "'api/v3/vip-request/deploy/%s/'", "%", "vip_request_ids", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "post", "(", "uri", ")" ]
Method to create vip request param vip_request_ids: vip_request ids
[ "Method", "to", "create", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L142-L150
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.remove_vip
def remove_vip(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRequest, self).delete(uri)
python
def remove_vip(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRequest, self).delete(uri)
[ "def", "remove_vip", "(", "self", ",", "vip_request_ids", ")", ":", "uri", "=", "'api/v3/vip-request/deploy/%s/'", "%", "vip_request_ids", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "delete", "(", "uri", ")" ]
Method to delete vip request param vip_request_ids: vip_request ids
[ "Method", "to", "delete", "vip", "request" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L167-L175
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.search
def search(self, **kwargs): """ Method to search vip's based on extends search. :param search: Dict containing QuerySets to find vip's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param ...
python
def search(self, **kwargs): """ Method to search vip's based on extends search. :param search: Dict containing QuerySets to find vip's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param ...
[ "def", "search", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "get", "(", "self", ".", "prepare_url", "(", "'api/v3/vip-request/'", ",", "kwargs", ")", ")" ]
Method to search vip's based on extends search. :param search: Dict containing QuerySets to find vip's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override def...
[ "Method", "to", "search", "vip", "s", "based", "on", "extends", "search", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L177-L190
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.delete
def delete(self, ids): """ Method to delete vip's by their id's :param ids: Identifiers of vip's :return: None """ url = build_uri_with_ids('api/v3/vip-request/%s/', ids) return super(ApiVipRequest, self).delete(url)
python
def delete(self, ids): """ Method to delete vip's by their id's :param ids: Identifiers of vip's :return: None """ url = build_uri_with_ids('api/v3/vip-request/%s/', ids) return super(ApiVipRequest, self).delete(url)
[ "def", "delete", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/vip-request/%s/'", ",", "ids", ")", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "delete", "(", "url", ")" ]
Method to delete vip's by their id's :param ids: Identifiers of vip's :return: None
[ "Method", "to", "delete", "vip", "s", "by", "their", "id", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L207-L216
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.update
def update(self, vips): """ Method to update vip's :param vips: List containing vip's desired to updated :return: None """ data = {'vips': vips} vips_ids = [str(vip.get('id')) for vip in vips] return super(ApiVipRequest, self).put('api/v3/vip-request/%s...
python
def update(self, vips): """ Method to update vip's :param vips: List containing vip's desired to updated :return: None """ data = {'vips': vips} vips_ids = [str(vip.get('id')) for vip in vips] return super(ApiVipRequest, self).put('api/v3/vip-request/%s...
[ "def", "update", "(", "self", ",", "vips", ")", ":", "data", "=", "{", "'vips'", ":", "vips", "}", "vips_ids", "=", "[", "str", "(", "vip", ".", "get", "(", "'id'", ")", ")", "for", "vip", "in", "vips", "]", "return", "super", "(", "ApiVipRequest...
Method to update vip's :param vips: List containing vip's desired to updated :return: None
[ "Method", "to", "update", "vip", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L218-L230
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.create
def create(self, vips): """ Method to create vip's :param vips: List containing vip's desired to be created on database :return: None """ data = {'vips': vips} return super(ApiVipRequest, self).post('api/v3/vip-request/', data)
python
def create(self, vips): """ Method to create vip's :param vips: List containing vip's desired to be created on database :return: None """ data = {'vips': vips} return super(ApiVipRequest, self).post('api/v3/vip-request/', data)
[ "def", "create", "(", "self", ",", "vips", ")", ":", "data", "=", "{", "'vips'", ":", "vips", "}", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "post", "(", "'api/v3/vip-request/'", ",", "data", ")" ]
Method to create vip's :param vips: List containing vip's desired to be created on database :return: None
[ "Method", "to", "create", "vip", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L232-L241
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.deploy
def deploy(self, ids): """ Method to deploy vip's :param vips: List containing vip's desired to be deployed on equipment :return: None """ url = build_uri_with_ids('api/v3/vip-request/deploy/%s/', ids) return super(ApiVipRequest, self).post(url)
python
def deploy(self, ids): """ Method to deploy vip's :param vips: List containing vip's desired to be deployed on equipment :return: None """ url = build_uri_with_ids('api/v3/vip-request/deploy/%s/', ids) return super(ApiVipRequest, self).post(url)
[ "def", "deploy", "(", "self", ",", "ids", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/vip-request/deploy/%s/'", ",", "ids", ")", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ".", "post", "(", "url", ")" ]
Method to deploy vip's :param vips: List containing vip's desired to be deployed on equipment :return: None
[ "Method", "to", "deploy", "vip", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L243-L252
globocom/GloboNetworkAPI-client-python
networkapiclient/ApiVipRequest.py
ApiVipRequest.undeploy
def undeploy(self, ids, clean_up=0): """ Method to undeploy vip's :param vips: List containing vip's desired to be undeployed on equipment :return: None """ url = build_uri_with_ids('api/v3/vip-request/deploy/%s/?cleanup=%s', ids, clean_up) return super(ApiVipRe...
python
def undeploy(self, ids, clean_up=0): """ Method to undeploy vip's :param vips: List containing vip's desired to be undeployed on equipment :return: None """ url = build_uri_with_ids('api/v3/vip-request/deploy/%s/?cleanup=%s', ids, clean_up) return super(ApiVipRe...
[ "def", "undeploy", "(", "self", ",", "ids", ",", "clean_up", "=", "0", ")", ":", "url", "=", "build_uri_with_ids", "(", "'api/v3/vip-request/deploy/%s/?cleanup=%s'", ",", "ids", ",", "clean_up", ")", "return", "super", "(", "ApiVipRequest", ",", "self", ")", ...
Method to undeploy vip's :param vips: List containing vip's desired to be undeployed on equipment :return: None
[ "Method", "to", "undeploy", "vip", "s" ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ApiVipRequest.py#L254-L263
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.add
def add(self, tipo_opcao, nome_opcao): """Inserts a new Option Pool and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :re...
python
def add(self, tipo_opcao, nome_opcao): """Inserts a new Option Pool and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :re...
[ "def", "add", "(", "self", ",", "tipo_opcao", ",", "nome_opcao", ")", ":", "#optionpool_map = dict()", "#optionpool_map['type'] = tipo_opcao", "#optionpool_map['name'] = nome_opcao", "url", "=", "'api/pools/options/save/'", "return", "self", ".", "post", "(", "url", ",", ...
Inserts a new Option Pool and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: ...
[ "Inserts", "a", "new", "Option", "Pool", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L40-L62
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.modify
def modify(self, id_option_pool, tipo_opcao, nome_opcao): """Change Option Pool from by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opca...
python
def modify(self, id_option_pool, tipo_opcao, nome_opcao): """Change Option Pool from by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opca...
[ "def", "modify", "(", "self", ",", "id_option_pool", ",", "tipo_opcao", ",", "nome_opcao", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_pool", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option Pool is invalid or was not informed....
Change Option Pool from by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respec...
[ "Change", "Option", "Pool", "from", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L65-L91
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.remove
def remove(self, id_option_pool): """Remove Option pool by identifier and all Environment related . :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option Pool identifier is null and invalid. ...
python
def remove(self, id_option_pool): """Remove Option pool by identifier and all Environment related . :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option Pool identifier is null and invalid. ...
[ "def", "remove", "(", "self", ",", "id_option_pool", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_pool", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option Pool is invalid or was not informed.'", ")", "url", "=", "'api/pools/optio...
Remove Option pool by identifier and all Environment related . :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option Pool identifier is null and invalid. :raise optionpoolNotFoundError: Option Po...
[ "Remove", "Option", "pool", "by", "identifier", "and", "all", "Environment", "related", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L93-L113
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.get_option_pool
def get_option_pool(self, id_option_pool): """Search Option Pool by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: Following dictionary: :: {‘id’: < id_option_pool >, ‘type’: < tipo_opcao >, ...
python
def get_option_pool(self, id_option_pool): """Search Option Pool by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: Following dictionary: :: {‘id’: < id_option_pool >, ‘type’: < tipo_opcao >, ...
[ "def", "get_option_pool", "(", "self", ",", "id_option_pool", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_pool", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option Pool is invalid or was not informed.'", ")", "url", "=", "'api/po...
Search Option Pool by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: Following dictionary: :: {‘id’: < id_option_pool >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >} :raise InvalidPar...
[ "Search", "Option", "Pool", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L115-L140
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.get_all_option_pool
def get_all_option_pool(self, option_type=None): """Get all Option Pool. :return: Dictionary with the following structure: :: {[{‘id’: < id >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >}, ... other option pool ...] } :raise optionpoolNotFou...
python
def get_all_option_pool(self, option_type=None): """Get all Option Pool. :return: Dictionary with the following structure: :: {[{‘id’: < id >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >}, ... other option pool ...] } :raise optionpoolNotFou...
[ "def", "get_all_option_pool", "(", "self", ",", "option_type", "=", "None", ")", ":", "if", "option_type", ":", "url", "=", "'api/pools/options/?type='", "+", "option_type", "else", ":", "url", "=", "'api/pools/options/'", "return", "self", ".", "get", "(", "u...
Get all Option Pool. :return: Dictionary with the following structure: :: {[{‘id’: < id >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >}, ... other option pool ...] } :raise optionpoolNotFoundError: Option Pool not registered. :raise DataBase...
[ "Get", "all", "Option", "Pool", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L142-L163
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.get_all_environment_option_pool
def get_all_environment_option_pool(self, id_environment=None, option_id=None, option_type=None): """Get all Option VIP by Environment . :return: Dictionary with the following structure: :: {[{‘id’: < id >, option: { 'id': <id> ...
python
def get_all_environment_option_pool(self, id_environment=None, option_id=None, option_type=None): """Get all Option VIP by Environment . :return: Dictionary with the following structure: :: {[{‘id’: < id >, option: { 'id': <id> ...
[ "def", "get_all_environment_option_pool", "(", "self", ",", "id_environment", "=", "None", ",", "option_id", "=", "None", ",", "option_type", "=", "None", ")", ":", "url", "=", "'api/pools/environment_options/'", "if", "id_environment", ":", "if", "option_id", ":"...
Get all Option VIP by Environment . :return: Dictionary with the following structure: :: {[{‘id’: < id >, option: { 'id': <id> 'type':<type> 'name':<name> } environment: { 'id':...
[ "Get", "all", "Option", "VIP", "by", "Environment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L165-L208
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.associate_environment_option_pool
def associate_environment_option_pool(self, id_option_pool, id_environment): """Create a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment . Integer value a...
python
def associate_environment_option_pool(self, id_option_pool, id_environment): """Create a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment . Integer value a...
[ "def", "associate_environment_option_pool", "(", "self", ",", "id_option_pool", ",", "id_environment", ")", ":", "if", "not", "is_valid_int_param", "(", "id_option_pool", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option Pool is invalid or was not i...
Create a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment . Integer value and greater than zero. :return: Dictionary with the following structure: ...
[ "Create", "a", "relationship", "of", "optionpool", "with", "Environment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L211-L250
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.disassociate_environment_option_pool
def disassociate_environment_option_pool(self, environment_option_id): """Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and...
python
def disassociate_environment_option_pool(self, environment_option_id): """Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and...
[ "def", "disassociate_environment_option_pool", "(", "self", ",", "environment_option_id", ")", ":", "if", "not", "is_valid_int_param", "(", "environment_option_id", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Option Pool is invalid or was not informed.'"...
Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and greater than zero. :return: { 'id': < environment_option_id> } ...
[ "Remove", "a", "relationship", "of", "optionpool", "with", "Environment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L279-L306
globocom/GloboNetworkAPI-client-python
networkapiclient/OptionPool.py
OptionPool.modify_environment_option_pool
def modify_environment_option_pool(self, environment_option_id, id_option_pool,id_environment ): """Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environme...
python
def modify_environment_option_pool(self, environment_option_id, id_option_pool,id_environment ): """Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environme...
[ "def", "modify_environment_option_pool", "(", "self", ",", "environment_option_id", ",", "id_option_pool", ",", "id_environment", ")", ":", "if", "not", "is_valid_int_param", "(", "environment_option_id", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier ...
Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and greater than zero. :return: Dictionary with the following struct...
[ "Remove", "a", "relationship", "of", "optionpool", "with", "Environment", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/OptionPool.py#L309-L349
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.add
def add(self, name, description): """Inserts a new Filter and returns its identifier. :param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-] :return: Following d...
python
def add(self, name, description): """Inserts a new Filter and returns its identifier. :param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-] :return: Following d...
[ "def", "add", "(", "self", ",", "name", ",", "description", ")", ":", "filter_map", "=", "dict", "(", ")", "filter_map", "[", "'name'", "]", "=", "name", "filter_map", "[", "'description'", "]", "=", "description", "code", ",", "xml", "=", "self", ".",...
Inserts a new Filter and returns its identifier. :param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: {'filter'...
[ "Inserts", "a", "new", "Filter", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L59-L82
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.alter
def alter(self, id_filter, name, description): """Change Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param description: Description. String w...
python
def alter(self, id_filter, name, description): """Change Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param description: Description. String w...
[ "def", "alter", "(", "self", ",", "id_filter", ",", "name", ",", "description", ")", ":", "if", "not", "is_valid_int_param", "(", "id_filter", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Filter is invalid or was not informed.'", ")", "filter_...
Change Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 50 characters and respect [a-zA-Z\_-] ...
[ "Change", "Filter", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L84-L112
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.remove
def remove(self, id_filter): """Remove Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: None :raise InvalidParameterError: Filter identifier is null and invalid. :raise FilterNotFoundError: Filter not registere...
python
def remove(self, id_filter): """Remove Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: None :raise InvalidParameterError: Filter identifier is null and invalid. :raise FilterNotFoundError: Filter not registere...
[ "def", "remove", "(", "self", ",", "id_filter", ")", ":", "if", "not", "is_valid_int_param", "(", "id_filter", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Filter is invalid or was not informed.'", ")", "url", "=", "'filter/'", "+", "str", "...
Remove Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: None :raise InvalidParameterError: Filter identifier is null and invalid. :raise FilterNotFoundError: Filter not registered. :raise DataBaseError: Network...
[ "Remove", "Filter", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L114-L135
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.get
def get(self, id_filter): """Get filter by id. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: Following dictionary: :: {‘filter’: {‘id’: < id >, ‘name’: < name >, ‘description’: < description >}} ...
python
def get(self, id_filter): """Get filter by id. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: Following dictionary: :: {‘filter’: {‘id’: < id >, ‘name’: < name >, ‘description’: < description >}} ...
[ "def", "get", "(", "self", ",", "id_filter", ")", ":", "url", "=", "'filter/get/'", "+", "str", "(", "id_filter", ")", "+", "'/'", "code", ",", "xml", "=", "self", ".", "submit", "(", "None", ",", "'GET'", ",", "url", ")", "return", "self", ".", ...
Get filter by id. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: Following dictionary: :: {‘filter’: {‘id’: < id >, ‘name’: < name >, ‘description’: < description >}} :raise InvalidParameterError: The val...
[ "Get", "filter", "by", "id", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L137-L159
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.associate
def associate(self, et_id, id_filter): """Create a relationship between Filter and TipoEquipamento. :param et_id: Identifier of TipoEquipamento. Integer value and greater than zero. :param id_filter: Identifier of Filter. Integer value and greater than zero. :return: Following dictiona...
python
def associate(self, et_id, id_filter): """Create a relationship between Filter and TipoEquipamento. :param et_id: Identifier of TipoEquipamento. Integer value and greater than zero. :param id_filter: Identifier of Filter. Integer value and greater than zero. :return: Following dictiona...
[ "def", "associate", "(", "self", ",", "et_id", ",", "id_filter", ")", ":", "if", "not", "is_valid_int_param", "(", "et_id", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of TipoEquipamento is invalid or was not informed.'", ")", "if", "not", "is_v...
Create a relationship between Filter and TipoEquipamento. :param et_id: Identifier of TipoEquipamento. Integer value and greater than zero. :param id_filter: Identifier of Filter. Integer value and greater than zero. :return: Following dictionary: :: {'equiptype_filter_xr...
[ "Create", "a", "relationship", "between", "Filter", "and", "TipoEquipamento", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L161-L193
globocom/GloboNetworkAPI-client-python
networkapiclient/Filter.py
Filter.dissociate
def dissociate(self, id_filter, id_eq_type): """Removes relationship between Filter and TipoEquipamento. :param id_filter: Identifier of Filter. Integer value and greater than zero. :param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero. :return: None ...
python
def dissociate(self, id_filter, id_eq_type): """Removes relationship between Filter and TipoEquipamento. :param id_filter: Identifier of Filter. Integer value and greater than zero. :param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero. :return: None ...
[ "def", "dissociate", "(", "self", ",", "id_filter", ",", "id_eq_type", ")", ":", "if", "not", "is_valid_int_param", "(", "id_filter", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Filter is invalid or was not informed.'", ")", "if", "not", "is_...
Removes relationship between Filter and TipoEquipamento. :param id_filter: Identifier of Filter. Integer value and greater than zero. :param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero. :return: None :raise FilterNotFoundError: Filter not registered. ...
[ "Removes", "relationship", "between", "Filter", "and", "TipoEquipamento", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/Filter.py#L195-L222
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.search
def search(self, id_egroup): """Search Group Equipament from by the identifier. :param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero. :return: Following dictionary: :: {‘group_equipament’: {‘id’: < id_egrupo >, ‘nome’: < n...
python
def search(self, id_egroup): """Search Group Equipament from by the identifier. :param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero. :return: Following dictionary: :: {‘group_equipament’: {‘id’: < id_egrupo >, ‘nome’: < n...
[ "def", "search", "(", "self", ",", "id_egroup", ")", ":", "if", "not", "is_valid_int_param", "(", "id_egroup", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Group Equipament is invalid or was not informed.'", ")", "url", "=", "'egroup/'", "+", ...
Search Group Equipament from by the identifier. :param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero. :return: Following dictionary: :: {‘group_equipament’: {‘id’: < id_egrupo >, ‘nome’: < nome >} } :raise InvalidParamete...
[ "Search", "Group", "Equipament", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L38-L64
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.inserir
def inserir(self, nome): """Insere um novo grupo de equipamento e retorna o seu identificador. :param nome: Nome do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}} :raise InvalidParameterError: Nome do grupo é nulo ou vazio. :raise...
python
def inserir(self, nome): """Insere um novo grupo de equipamento e retorna o seu identificador. :param nome: Nome do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}} :raise InvalidParameterError: Nome do grupo é nulo ou vazio. :raise...
[ "def", "inserir", "(", "self", ",", "nome", ")", ":", "egrupo_map", "=", "dict", "(", ")", "egrupo_map", "[", "'nome'", "]", "=", "nome", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "'grupo'", ":", "egrupo_map", "}", ",", "'POST'", ",...
Insere um novo grupo de equipamento e retorna o seu identificador. :param nome: Nome do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}} :raise InvalidParameterError: Nome do grupo é nulo ou vazio. :raise NomeGrupoEquipamentoDuplicadoError:...
[ "Insere", "um", "novo", "grupo", "de", "equipamento", "e", "retorna", "o", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L111-L128
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.alterar
def alterar(self, id_egrupo, nome): """Altera os dados de um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param nome: Nome do grupo de equipamento. :return: None :raise InvalidParameterError: O identificador e/ou...
python
def alterar(self, id_egrupo, nome): """Altera os dados de um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param nome: Nome do grupo de equipamento. :return: None :raise InvalidParameterError: O identificador e/ou...
[ "def", "alterar", "(", "self", ",", "id_egrupo", ",", "nome", ")", ":", "if", "not", "is_valid_int_param", "(", "id_egrupo", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do grupo de equipamento é inválido ou não foi informado.')", "", "url", "=", ...
Altera os dados de um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param nome: Nome do grupo de equipamento. :return: None :raise InvalidParameterError: O identificador e/ou o nome do grupo são nulos ou inválidos. ...
[ "Altera", "os", "dados", "de", "um", "grupo", "de", "equipamento", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L130-L155
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.remover
def remover(self, id_egrupo): """Remove um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :return: None :raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado. :raise InvalidParameterError: O ide...
python
def remover(self, id_egrupo): """Remove um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :return: None :raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado. :raise InvalidParameterError: O ide...
[ "def", "remover", "(", "self", ",", "id_egrupo", ")", ":", "if", "not", "is_valid_int_param", "(", "id_egrupo", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do grupo de equipamento é inválido ou não foi informado.')", "", "url", "=", "'egrupo/'", ...
Remove um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :return: None :raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado. :raise InvalidParameterError: O identificador do grupo é nulo ou inválido. ...
[ "Remove", "um", "grupo", "de", "equipamento", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L157-L178
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.associa_equipamento
def associa_equipamento(self, id_equip, id_grupo_equipamento): """Associa um equipamento a um grupo. :param id_equip: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipament...
python
def associa_equipamento(self, id_equip, id_grupo_equipamento): """Associa um equipamento a um grupo. :param id_equip: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipament...
[ "def", "associa_equipamento", "(", "self", ",", "id_equip", ",", "id_grupo_equipamento", ")", ":", "equip_map", "=", "dict", "(", ")", "equip_map", "[", "'id_grupo'", "]", "=", "id_grupo_equipamento", "equip_map", "[", "'id_equipamento'", "]", "=", "id_equip", "...
Associa um equipamento a um grupo. :param id_equip: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipamento_grupo':{'id': < id_equip_do_grupo >}} :raise GrupoEquipamentoNa...
[ "Associa", "um", "equipamento", "a", "um", "grupo", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L180-L204
globocom/GloboNetworkAPI-client-python
networkapiclient/GrupoEquipamento.py
GrupoEquipamento.remove
def remove(self, id_equipamento, id_egrupo): """Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param id_equipamento: Identificador do equipamento. :return: None :raise E...
python
def remove(self, id_equipamento, id_egrupo): """Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param id_equipamento: Identificador do equipamento. :return: None :raise E...
[ "def", "remove", "(", "self", ",", "id_equipamento", ",", "id_egrupo", ")", ":", "if", "not", "is_valid_int_param", "(", "id_egrupo", ")", ":", "raise", "InvalidParameterError", "(", "u'O identificador do grupo de equipamento é inválido ou não foi informado.')", "", "if",...
Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param id_equipamento: Identificador do equipamento. :return: None :raise EquipamentoNaoExisteError: Equipamento não cadastrado. ...
[ "Remove", "a", "associacao", "de", "um", "grupo", "de", "equipamento", "com", "um", "equipamento", "a", "partir", "do", "seu", "identificador", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/GrupoEquipamento.py#L206-L234
globocom/GloboNetworkAPI-client-python
networkapiclient/AmbienteLogico.py
AmbienteLogico.inserir
def inserir(self, name): """Inserts a new Logical Environment and returns its identifier. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: Dictionary with the following structure: :: {'logical_environment': {'id': < id_l...
python
def inserir(self, name): """Inserts a new Logical Environment and returns its identifier. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: Dictionary with the following structure: :: {'logical_environment': {'id': < id_l...
[ "def", "inserir", "(", "self", ",", "name", ")", ":", "logical_environment_map", "=", "dict", "(", ")", "logical_environment_map", "[", "'name'", "]", "=", "name", "code", ",", "xml", "=", "self", ".", "submit", "(", "{", "'logical_environment'", ":", "log...
Inserts a new Logical Environment and returns its identifier. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: Dictionary with the following structure: :: {'logical_environment': {'id': < id_logical_environment >}} :rai...
[ "Inserts", "a", "new", "Logical", "Environment", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L58-L81
globocom/GloboNetworkAPI-client-python
networkapiclient/AmbienteLogico.py
AmbienteLogico.alterar
def alterar(self, id_logicalenvironment, name): """Change Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 charac...
python
def alterar(self, id_logicalenvironment, name): """Change Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 charac...
[ "def", "alterar", "(", "self", ",", "id_logicalenvironment", ",", "name", ")", ":", "if", "not", "is_valid_int_param", "(", "id_logicalenvironment", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Logical Environment is invalid or was not informed.'", ...
Change Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: None :raise InvalidParamete...
[ "Change", "Logical", "Environment", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L83-L110
globocom/GloboNetworkAPI-client-python
networkapiclient/AmbienteLogico.py
AmbienteLogico.remover
def remover(self, id_logicalenvironment): """Remove Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Logical Environment i...
python
def remover(self, id_logicalenvironment): """Remove Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Logical Environment i...
[ "def", "remover", "(", "self", ",", "id_logicalenvironment", ")", ":", "if", "not", "is_valid_int_param", "(", "id_logicalenvironment", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Logical Environment is invalid or was not informed.'", ")", "url", "...
Remove Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Logical Environment is null and invalid. :raise AmbienteLogicoNaoE...
[ "Remove", "Logical", "Environment", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/AmbienteLogico.py#L112-L133
globocom/GloboNetworkAPI-client-python
networkapiclient/exception.py
ErrorHandler.handle
def handle(cls, code, description): '''Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente. :param code: Código de erro retornado pela networkAPI. :param description: Descrição do erro. :return: None ''' if code is None: rais...
python
def handle(cls, code, description): '''Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente. :param code: Código de erro retornado pela networkAPI. :param description: Descrição do erro. :return: None ''' if code is None: rais...
[ "def", "handle", "(", "cls", ",", "code", ",", "description", ")", ":", "if", "code", "is", "None", ":", "raise", "NetworkAPIClientError", "(", "description", ")", "if", "int", "(", "code", ")", "in", "cls", ".", "errors", ":", "raise", "cls", ".", "...
Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente. :param code: Código de erro retornado pela networkAPI. :param description: Descrição do erro. :return: None
[ "Recebe", "o", "código", "e", "a", "descrição", "do", "erro", "da", "networkAPI", "e", "lança", "a", "exceção", "correspondente", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/exception.py#L1109-L1123
globocom/GloboNetworkAPI-client-python
networkapiclient/PermissaoAdministrativa.py
PermissaoAdministrativa.list_by_group
def list_by_group(self, id_ugroup): """Search Administrative Permission by Group User by identifier. :param id_ugroup: Identifier of the Group User. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'perms': [{'ugrupo': < ugrupo_id...
python
def list_by_group(self, id_ugroup): """Search Administrative Permission by Group User by identifier. :param id_ugroup: Identifier of the Group User. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'perms': [{'ugrupo': < ugrupo_id...
[ "def", "list_by_group", "(", "self", ",", "id_ugroup", ")", ":", "if", "id_ugroup", "is", "None", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Group User is invalid or was not informed.'", ")", "url", "=", "'aperms/group/'", "+", "str", "(", "id_ug...
Search Administrative Permission by Group User by identifier. :param id_ugroup: Identifier of the Group User. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'perms': [{'ugrupo': < ugrupo_id >, 'permission': { 'function' < function >, '...
[ "Search", "Administrative", "Permission", "by", "Group", "User", "by", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L38-L65
globocom/GloboNetworkAPI-client-python
networkapiclient/PermissaoAdministrativa.py
PermissaoAdministrativa.search
def search(self, id_perm): """Search Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :return: Following dictionary: :: {'perm': {'ugrupo': < ugrupo_id >, 'permi...
python
def search(self, id_perm): """Search Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :return: Following dictionary: :: {'perm': {'ugrupo': < ugrupo_id >, 'permi...
[ "def", "search", "(", "self", ",", "id_perm", ")", ":", "if", "not", "is_valid_int_param", "(", "id_perm", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Administrative Permission is invalid or was not informed.'", ")", "url", "=", "'aperms/get/'", ...
Search Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :return: Following dictionary: :: {'perm': {'ugrupo': < ugrupo_id >, 'permission': < permission_id >, 'id': < id ...
[ "Search", "Administrative", "Permission", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L67-L94
globocom/GloboNetworkAPI-client-python
networkapiclient/PermissaoAdministrativa.py
PermissaoAdministrativa.inserir
def inserir(self, id_permission, read, write, id_group): """Inserts a new Administrative Permission and returns its identifier. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Write. 0 or 1 :param i...
python
def inserir(self, id_permission, read, write, id_group): """Inserts a new Administrative Permission and returns its identifier. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Write. 0 or 1 :param i...
[ "def", "inserir", "(", "self", ",", "id_permission", ",", "read", ",", "write", ",", "id_group", ")", ":", "perms_map", "=", "dict", "(", ")", "perms_map", "[", "'id_permission'", "]", "=", "id_permission", "perms_map", "[", "'read'", "]", "=", "read", "...
Inserts a new Administrative Permission and returns its identifier. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Write. 0 or 1 :param id_group: Identifier of the Group of User. Integer value and greater ...
[ "Inserts", "a", "new", "Administrative", "Permission", "and", "returns", "its", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L117-L147
globocom/GloboNetworkAPI-client-python
networkapiclient/PermissaoAdministrativa.py
PermissaoAdministrativa.alterar
def alterar(self, id_perm, id_permission, read, write, id_group): """Change Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :param id_permission: Identifier of the Permission. Integer value and g...
python
def alterar(self, id_perm, id_permission, read, write, id_group): """Change Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :param id_permission: Identifier of the Permission. Integer value and g...
[ "def", "alterar", "(", "self", ",", "id_perm", ",", "id_permission", ",", "read", ",", "write", ",", "id_group", ")", ":", "if", "not", "is_valid_int_param", "(", "id_perm", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Administrative Permi...
Change Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Wri...
[ "Change", "Administrative", "Permission", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L149-L183
globocom/GloboNetworkAPI-client-python
networkapiclient/PermissaoAdministrativa.py
PermissaoAdministrativa.remover
def remover(self, id_perms): """Remove Administrative Permission from by the identifier. :param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Administrative Permission is null a...
python
def remover(self, id_perms): """Remove Administrative Permission from by the identifier. :param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Administrative Permission is null a...
[ "def", "remover", "(", "self", ",", "id_perms", ")", ":", "if", "not", "is_valid_int_param", "(", "id_perms", ")", ":", "raise", "InvalidParameterError", "(", "u'The identifier of Administrative Permission is invalid or was not informed.'", ")", "url", "=", "'aperms/'", ...
Remove Administrative Permission from by the identifier. :param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Administrative Permission is null and invalid. :raise PermissaoAdmi...
[ "Remove", "Administrative", "Permission", "from", "by", "the", "identifier", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/PermissaoAdministrativa.py#L185-L205
globocom/GloboNetworkAPI-client-python
networkapiclient/ClientFactory.py
ClientFactory.create_ambiente
def create_ambiente(self): """Get an instance of ambiente services facade.""" return Ambiente( self.networkapi_url, self.user, self.password, self.user_ldap)
python
def create_ambiente(self): """Get an instance of ambiente services facade.""" return Ambiente( self.networkapi_url, self.user, self.password, self.user_ldap)
[ "def", "create_ambiente", "(", "self", ")", ":", "return", "Ambiente", "(", "self", ".", "networkapi_url", ",", "self", ".", "user", ",", "self", ".", "password", ",", "self", ".", "user_ldap", ")" ]
Get an instance of ambiente services facade.
[ "Get", "an", "instance", "of", "ambiente", "services", "facade", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L100-L106
globocom/GloboNetworkAPI-client-python
networkapiclient/ClientFactory.py
ClientFactory.create_ambiente_logico
def create_ambiente_logico(self): """Get an instance of ambiente_logico services facade.""" return AmbienteLogico( self.networkapi_url, self.user, self.password, self.user_ldap)
python
def create_ambiente_logico(self): """Get an instance of ambiente_logico services facade.""" return AmbienteLogico( self.networkapi_url, self.user, self.password, self.user_ldap)
[ "def", "create_ambiente_logico", "(", "self", ")", ":", "return", "AmbienteLogico", "(", "self", ".", "networkapi_url", ",", "self", ".", "user", ",", "self", ".", "password", ",", "self", ".", "user_ldap", ")" ]
Get an instance of ambiente_logico services facade.
[ "Get", "an", "instance", "of", "ambiente_logico", "services", "facade", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L108-L114
globocom/GloboNetworkAPI-client-python
networkapiclient/ClientFactory.py
ClientFactory.create_api_environment_vip
def create_api_environment_vip(self): """Get an instance of Api Environment Vip services facade.""" return ApiEnvironmentVip( self.networkapi_url, self.user, self.password, self.user_ldap)
python
def create_api_environment_vip(self): """Get an instance of Api Environment Vip services facade.""" return ApiEnvironmentVip( self.networkapi_url, self.user, self.password, self.user_ldap)
[ "def", "create_api_environment_vip", "(", "self", ")", ":", "return", "ApiEnvironmentVip", "(", "self", ".", "networkapi_url", ",", "self", ".", "user", ",", "self", ".", "password", ",", "self", ".", "user_ldap", ")" ]
Get an instance of Api Environment Vip services facade.
[ "Get", "an", "instance", "of", "Api", "Environment", "Vip", "services", "facade", "." ]
train
https://github.com/globocom/GloboNetworkAPI-client-python/blob/cf34f913da48d9abbf750114f5d2ac4b2dde137d/networkapiclient/ClientFactory.py#L116-L122