text
stringlengths
81
112k
Edit access type, fqdn, user, password and enable_pass of the relationship of equipment and access type. :param id_tipo_acesso: Access type identifier. :param id_equip_acesso: Equipment identifier. :param fqdn: Equipment FQDN. :param user: User. :param password: Password...
Removes relationship between equipment and access type. :param id_equipamento: Equipment identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise EquipamentoNaoExisteError: Equipment doesn't exist. :raise EquipamentoAcessoNaoExisteError: Relationship bet...
Enable/Disable pool member by list def set_poolmember_state(self, id_pools, pools): """ Enable/Disable pool member by list """ data = dict() uri = "api/v3/pool/real/%s/member/status/" % ';'.join(id_pools) data["server_pools"] = pools return self.put(uri, data...
Enable/Disable pool member by list def get_poolmember_state(self, id_pools, checkstatus=0): """ Enable/Disable pool member by list """ uri = "api/v3/pool/real/%s/member/status/?checkstatus=%s" % (';'.join(id_pools), checkstatus) return self.get(uri)
List All Pools To Populate Datatable :param pagination: Object Pagination :return: Following dictionary:{ "total" : < total >, "pools" :[{ "id": < id > ...
List All Pools To Populate Datatable :param pagination: Object Pagination :return: Following dictionary:{ "total" : < total >, "pools" :[{ "id": < id > ...
Remove Pools Running Script And Update to Not Created :param ids: List of ids :return: None on success :raise ScriptRemovePoolException :raise InvalidIdPoolException :raise NetworkAPIException def remove(self, pools): """ Remove Pools R...
Create Pools Running Script And Update to Created :param pools: List of pools :return: None on success :raise PoolDoesNotExistException :raise ScriptCreatePoolException :raise InvalidIdPoolException :raise NetworkAPIException def create(self, p...
Enable Pool Members Running Script :param ids: List of ids :return: None on success :raise PoolMemberDoesNotExistException :raise InvalidIdPoolMemberException :raise ScriptEnablePoolException :raise NetworkAPIException def enable(self, ids): ...
Disable Pool Members Running Script :param ids: List of ids :return: None on success :raise PoolMemberDoesNotExistException :raise InvalidIdPoolMemberException :raise ScriptDisablePoolException :raise NetworkAPIException def disable(self, ids):...
Lista todos os direitos de um grupo de usuário em grupos de equipamento. :param id_grupo_usuario: Identificador do grupo de usuário para filtrar a pesquisa. :return: Dicionário com a seguinte estrutura: :: {'direito_grupo_equipamento': [{'id_grupo_equipamento': < id_g...
Lista todos os direitos de grupos de usuário em um grupo de equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento para filtrar a pesquisa. :return: Dicionário com a seguinte estrutura: :: {'direito_grupo_equipamento': [{'id_grupo_equipamento'...
Obtém os direitos de um grupo de usuário e um grupo de equipamento. :param id_direito: Identificador do direito grupo equipamento. :return: Dicionário com a seguinte estrutura: :: {'direito_grupo_equipamento': {'id_grupo_equipamento': < id_grupo_equipamento >, ...
Cria um novo direito de um grupo de usuário em um grupo de equipamento e retorna o seu identificador. :param id_grupo_usuario: Identificador do grupo de usuário. :param id_grupo_equipamento: Identificador do grupo de equipamento. :param leitura: Indicação de permissão de leitura ('0' ou '1'). ...
Altera os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador. :param id_direito: Identificador do direito grupo equipamento. :param leitura: Indicação de permissão de leitura ('0' ou '1'). :param escrita: Indicação de permissão de escrita ('0' ou '1'). ...
Remove os direitos de um grupo de usuário em um grupo de equipamento a partir do seu identificador. :param id_direito: Identificador do direito grupo equipamento :return: None :raise DireitoGrupoEquipamentoNaoExisteError: Direito Grupo Equipamento não cadastrado. :raise InvalidParamet...
Method to search object group permissions based on extends search. :param search: Dict containing QuerySets to find object group permissions. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: A...
Method to delete object group permissions by their ids :param ids: Identifiers of object group permissions :return: None def delete(self, ids): """ Method to delete object group permissions by their ids :param ids: Identifiers of object group permissions :return: None ...
Method to update object group permissions :param ogps: List containing object group permissions desired to updated :return: None def update(self, ogps): """ Method to update object group permissions :param ogps: List containing object group permissions desired to updated ...
Method to create object group permissions :param ogps: List containing vrf desired to be created on database :return: None def create(self, ogps): """ Method to create object group permissions :param ogps: List containing vrf desired to be created on database :return: ...
Inserts a new Related Equipment with Script and returns its identifier :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: Dictionary with the following structure: ...
Method to search vrf's based on extends search. :param search: Dict containing QuerySets to find vrf's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override def...
Method to delete vrf's by their id's :param ids: Identifiers of vrf's :return: None def delete(self, ids): """ Method to delete vrf's by their id's :param ids: Identifiers of vrf's :return: None """ url = build_uri_with_ids('api/v3/vrf/%s/', ids) ...
Method to update vrf's :param vrfs: List containing vrf's desired to updated :return: None def update(self, vrfs): """ Method to update vrf's :param vrfs: List containing vrf's desired to updated :return: None """ data = {'vrfs': vrfs} vrfs_ids...
Method to create vrf's :param vrfs: List containing vrf's desired to be created on database :return: None def create(self, vrfs): """ Method to create vrf's :param vrfs: List containing vrf's desired to be created on database :return: None """ data = {...
Inserts a new Equipment Type and returns its identifier :param name: Equipment Type name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'tipo_equipamento': {'id': < id_equipment_ype >}} :raise InvalidParameter...
Inserts a new Related Equipment with Environment and returns its identifier :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :param id_environment: Identifier of the Environment. Integer value and greater than zero. :param is_router: Identifier of the Envir...
Remove Related Equipment with Environment from by the identifier. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :param id_environment: Identifier of the Environment. Integer value and greater than zero. :return: None :raise InvalidParameterErro...
Remove Related Equipment with Environment from by the identifier. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :param id_environment: Identifier of the Environment. Integer value and greater than zero. :param is_router: Identifier of the Environment. Bo...
Remove a connection between two interfaces def remove_connection(self, interface1, interface2): """Remove a connection between two interfaces""" uri = "api/interface/disconnect/%s/%s/" % (interface1, interface2) return self.delete(uri)
Method to search interfaces based on extends search. :return: Dict containing interfaces. def search(self, **kwargs): """ Method to search interfaces based on extends search. :return: Dict containing interfaces. """ return super(ApiInterfaceRequest, self).get(self.prepa...
Method to get interfaces by their ids. :param ids: List containing identifiers of interfaces. :return: Dict containing interfaces. def get(self, ids, **kwargs): """ Method to get interfaces by their ids. :param ids: List containing identifiers of interfaces. :return: Dic...
Method to delete interface by id. :param ids: List containing identifiers of interfaces. def remove(self, ids, **kwargs): """ Method to delete interface by id. :param ids: List containing identifiers of interfaces. """ url = build_uri_with_ids('api/v3/interface/%s/', ids...
Method to add an interface. :param interface: List containing interface's desired to be created on database. :return: Id. def create(self, interface): """ Method to add an interface. :param interface: List containing interface's desired to be created on database. :return...
Method to update interface. :param interfaces: List containing interface's desired to be updated on database. :return: None. def update(self, interfaces=None): """ Method to update interface. :param interfaces: List containing interface's desired to be updated on database. ...
Method to add an interface. :param int_env_map: List containing interfaces and environments ids desired to be associates. :return: Id. def associate_interface_environments(self, int_env_map): """ Method to add an interface. :param int_env_map: List containing interfaces and envi...
Method to connecting interfaces. :param interfaces: List containing a dictionary with the interfaces ids and front or back. :return: 200 OK. def connecting_interfaces(self, interfaces): """ Method to connecting interfaces. :param interfaces: List containing a dictionary with the...
Method to remove the link between interfaces. :param interfaces: List of ids. :return: 200 OK. def disconnecting_interfaces(self, interfaces, **kwargs): """ Method to remove the link between interfaces. :param interfaces: List of ids. :return: 200 OK. """ ...
Method to create a channel. :param channel: List containing channel's desired to be created on database. :return: Id. def create_channel(self, channel): """ Method to create a channel. :param channel: List containing channel's desired to be created on database. :return: ...
Method to update a channel. :param channel: List containing channel's desired to be created on database. :return: Id. def update_channel(self, channel): """ Method to update a channel. :param channel: List containing channel's desired to be created on database. :return: ...
Inserts a new Group L3 and returns its identifier. :param name: Group L3 name. String with a minimum 2 and maximum of 80 characters :return: Dictionary with the following structure: :: {'group_l3': {'id': < id_group_l3 >}} :raise InvalidParameterError: Name is null and i...
Change Group L3 from by the identifier. :param id_groupl3: Identifier of the Group L3. Integer value and greater than zero. :param name: Group L3 name. String with a minimum 2 and maximum of 80 characters :return: None :raise InvalidParameterError: The identifier of Group L3 or name i...
Remove Group L3 from by the identifier. :param id_groupl3: Identifier of the Group L3. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Group L3 is null and invalid. :raise GrupoL3NaoExisteError: Group L3 not registered. :raise...
Envia uma requisição GET para a URL informada. Se auth_map é diferente de None, então deverá conter as chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar a autenticação na networkAPI. As chaves e os seus valores são enviados no header da requisição. :param url: URL ...
Envia uma requisição PUT para a URL informada. Se auth_map é diferente de None, então deverá conter as chaves NETWORKAPI_PASSWORD e NETWORKAPI_USERNAME para realizar a autenticação na networkAPI. As chaves e os seus valores são enviados no header da requisição. :param ...
Gera um XML a partir dos dados do dicionário e o envia através de uma requisição POST. :param url: URL para enviar a requisição HTTP. :param map: Dicionário com os dados do corpo da requisição HTTP. :param auth_map: Dicionário com as informações para autenticação na networkAPI. :return...
Gera um XML a partir dos dados do dicionário e o envia através de uma requisição PUT. :param url: URL para enviar a requisição HTTP. :param map: Dicionário com os dados do corpo da requisição HTTP. :param auth_map: Dicionário com as informações para autenticação na networkAPI. :return:...
Envia uma requisição GET. :param url: URL para enviar a requisição HTTP. :param auth_map: Dicionário com as informações para autenticação na networkAPI. :return: Retorna uma tupla contendo: (< código de resposta http >, < corpo da resposta >). :raise ConnectionError: Falha...
Gera um XML a partir dos dados do dicionário e o envia através de uma requisição DELETE. :param url: URL para enviar a requisição HTTP. :param map: Dicionário com os dados do corpo da requisição HTTP. :param auth_map: Dicionário com as informações para autenticação na networkAPI. :retu...
Returns url path with querystring def get_full_url(self, parsed_url): """ Returns url path with querystring """ full_path = parsed_url.path if parsed_url.query: full_path = '%s?%s' % (full_path, parsed_url.query) return full_path
Envia a requisição HTTP de acordo com os parâmetros informados no construtor. :param map: Dicionário com os dados do corpo da requisição. :return: Retorna uma tupla contendo: (< código de resposta http >, < corpo da resposta >). :raise ConnectionError: Falha na conexão com a netwo...
Method to search Virtual Interfaces based on extends search. :param search: Dict containing QuerySets to find Virtual Interfaces. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array contain...
Method to delete Virtual Interfaces by their id's :param ids: Identifiers of Virtual Interfaces :return: None def delete(self, ids): """ Method to delete Virtual Interfaces by their id's :param ids: Identifiers of Virtual Interfaces :return: None """ ur...
Method to update Virtual Interfaces :param Virtual Interfaces: List containing Virtual Interfaces desired to updated :return: None def update(self, virtual_interfaces): """ Method to update Virtual Interfaces :param Virtual Interfaces: List containing Virtual Interfaces desire...
Method to create Virtual Interfaces :param Virtual Interfaces: List containing Virtual Interfaces desired to be created on database :return: None def create(self, virtual_interfaces): """ Method to create Virtual Interfaces :param Virtual Interfaces: List containing Virtual In...
Search Group User by its identifier. :param id_ugroup: Identifier of the Group User. Integer value and greater than zero. :return: Following dictionary: :: {‘user_group’: {'escrita': < escrita >, 'nome': < nome >, 'exclusao': < exclusao >, 'edi...
Insert new user group and returns its identifier. :param name: User group's name. :param read: If user group has read permission ('S' ou 'N'). :param write: If user group has write permission ('S' ou 'N'). :param edit: If user group has edit permission ('S' ou 'N'). :param remov...
Edit user group data from its identifier. :param id_user_group: User group id. :param name: User group name. :param read: If user group has read permission ('S' ou 'N'). :param write: If user group has write permission ('S' ou 'N'). :param edit: If user group has edit permission...
Removes a user group by its id. :param id_user_group: User Group's identifier. Valid integer greater than zero. :return: None :raise GrupoUsuarioNaoExisteError: User Group not found. :raise InvalidParameterError: User Group id is invalid or none. :raise DataBaseError: Networka...
Method to get environment def get_environment(self, environment_ids): """ Method to get environment """ uri = 'api/v3/environment/%s/' % environment_ids return super(ApiEnvironment, self).get(uri)
Method to create environment def create_environment(self, environment): """ Method to create environment """ uri = 'api/v3/environment/' data = dict() data['environments'] = list() data['environments'].append(environment) return super(ApiEnvironment, s...
Method to update environment :param environment_ids: Ids of Environment def update_environment(self, environment, environment_ids): """ Method to update environment :param environment_ids: Ids of Environment """ uri = 'api/v3/environment/%s/' % environment_ids ...
Method to delete environment :param environment_ids: Ids of Environment def delete_environment(self, environment_ids): """ Method to delete environment :param environment_ids: Ids of Environment """ uri = 'api/v3/environment/%s/' % environment_ids return super...
Method to search environments based on extends search. :param search: Dict containing QuerySets to find environments. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields t...
Method to delete environments by their id's :param ids: Identifiers of environments :return: None def delete(self, ids): """ Method to delete environments by their id's :param ids: Identifiers of environments :return: None """ url = build_uri_with_ids('...
Method to update environments :param environments: List containing environments desired to updated :return: None def update(self, environments): """ Method to update environments :param environments: List containing environments desired to updated :return: None ...
Method to create environments :param environments: Dict containing environments desired to be created on database :return: None def create(self, environments): """ Method to create environments :param environments: Dict containing environments desired to be created on database...
Method to search asns based on extends search. :param search: Dict containing QuerySets to find asns. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override defau...
Method to delete asns by their id's :param ids: Identifiers of asns :return: None def delete(self, ids): """ Method to delete asns by their id's :param ids: Identifiers of asns :return: None """ url = build_uri_with_ids('api/v4/as/%s/', ids) ret...
Method to update asns :param asns: List containing asns desired to updated :return: None def update(self, asns): """ Method to update asns :param asns: List containing asns desired to updated :return: None """ data = {'asns': asns} asns_ids = [...
Method to create asns :param asns: List containing asns desired to be created on database :return: None def create(self, asns): """ Method to create asns :param asns: List containing asns desired to be created on database :return: None """ data = {'asn...
Search all logs, filtering by the given parameters. :param user_name: Filter by user_name :param first_date: Sets initial date for begin of the filter :param start_time: Sets initial time :param last_date: Sets final date :param end_time: Sets final time and ends the filter. That...
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 delete equipments by their id's :param ids: Identifiers of equipments :return: None def delete(self, ids): """ Method to delete equipments by their id's :param ids: Identifiers of equipments :return: None """ url = build_uri_with_ids('api/v4/e...
Method to update equipments :param equipments: List containing equipments desired to updated :return: None def update(self, equipments): """ Method to update equipments :param equipments: List containing equipments desired to updated :return: None """ ...
Method to create equipments :param equipments: List containing equipments desired to be created on database :return: None def create(self, equipments): """ Method to create equipments :param equipments: List containing equipments desired to be created on database :retu...
Realiza um requisição HTTP para a networkAPI. :param map: Dicionário com os dados para gerar o XML enviado no corpo da requisição HTTP. :param method: Método da requisição HTTP ('GET', 'POST', 'PUT' ou 'DELETE'). :param postfix: Posfixo a ser colocado na URL básica de acesso à networkAPI. Ex: /...
Obtem do XML de resposta, o código e a descrição do erro. O XML corresponde ao corpo da resposta HTTP de código 500. :param xml: XML contido na resposta da requisição HTTP. :return: Tupla com o código e a descrição do erro contido no XML: (< codigo_erro>, < descricao_erro>) def g...
Cria um dicionário com os dados de retorno da requisição HTTP ou lança uma exceção correspondente ao erro ocorrido. Se a requisição HTTP retornar o código 200 então este método retorna o dicionário com os dados da resposta. Se a requisição HTTP retornar um código diferente de 20...
Inserts a new Script and returns its identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters :param description: Script description. String with a minimum 3 and maximu...
Change Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters ...
Remove Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script is null and invalid. :raise RoteiroNaoExisteError: Script not registered. :raise DataBase...
List all Script by Script Type. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘script’: [{‘id’: < id >, ‘tipo_roteiro': < id_tipo_roteiro >, ‘nome': < nome >...
List all Script related Equipment. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {script': [{‘id’: < id >, ‘nome’: < nome >, ‘descricao’: < descricao >, ...
Get rule by indentifier. :param rule_id: Rule identifier :return: Dictionary with the following structure: :: {'rule': {'environment': < environment_id >, 'content': < content >, 'custom': < custom >, 'id': < id >, 'name': < name >}...
Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing def create_networks(self, ids, id_vlan): """Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 ...
Add new network :param network: IPV4 or IPV6 (ex.: "10.0.0.3/24") :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_network_type: Identifier of the NetworkType. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environ...
Edit a network 4 or 6 :param id_network: Identifier of the Network. Integer value and greater than zero. :param id_net_type: Identifier of the NetworkType. Integer value and greater than zero. :param id_env_vip: Identifier of the Environment Vip. Integer value and greater than zero. :pa...
Get networkipv4 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, 'ambiente_vip': < id_ambiente_vip >, 'vlan': <i...
Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, 'ambiente_vip': < id_ambiente_viṕ >, 'vlan': <i...
Deallocate all relationships between NetworkIPv4. :param id_network_ipv4: ID for NetworkIPv4 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv4. :raise NetworkIPv4NotFoundError: NetworkIPv4 not found. :raise DataBaseError: Networkapi failed to access the...
Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param id_ambiente_vip: Identifier of the Environment Vip. Integer value and greater than zero. :para...
Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the NetworkType. Integer value and greater than zero. :param num_hosts: Number of hosts expected. Integer value and greater than zero. :param id_ambiente_v...
Deallocate all relationships between NetworkIPv6. :param id_network_ipv6: ID for NetworkIPv6 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv6. :raise NetworkIPv6NotFoundError: NetworkIPv6 not found. :raise DataBaseError: Networkapi failed to access the...
Set column 'active = 0' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing :raise NetworkInactiveError: Unable to remove the network because it is inactive. :raise InvalidParameterError: Invalid ID for Network or NetworkType. :r...
List all DHCPRelayIPv4. :param: networkipv4_id, ipv4_id :return: Following dictionary: { "networkipv4": <networkipv4_id>, "id": <id>, "ipv4": { "oct4": <oct4>, "oct2": <oct2>, "oct3": <oct3>, "oct1": <oct1>...
List all DHCPRelayIPv4. :param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id :return: Following dictionary: [ { "networkipv4": <networkipv4_id>, "id": <id>, ...
List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, "block3": <block3>, "bloc...
List all DHCPRelayIPv6. :param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id :return: Following dictionary: [ { "networkipv6": <networkipv4_id>, "id": <id>, ...
Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...