sentence1
stringlengths
52
3.87M
sentence2
stringlengths
1
47.2k
label
stringclasses
1 value
def response(self, code, xml, force_list=None): """Cria um dicionário com os dados de retorno da requisição HTTP ou lança uma exceção correspondente ao erro ocorrido. Se a requisição HTTP retornar o código 200 então este método retorna o dicionário com os dados da resposta. ...
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...
entailment
def inserir(self, id_script_type, script, model, description): """Inserts a new Script and returns its identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param script: Script name. String with a minimum 3 and maximum of 40 characters ...
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...
entailment
def alterar(self, id_script, id_script_type, script, description, model=None): """Change Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. ...
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 ...
entailment
def remover(self, id_script): """Remove Script from by the identifier. :param id_script: Identifier of the Script. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script is null and invalid. :raise RoteiroNaoExisteError: Scrip...
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...
entailment
def listar_por_tipo(self, id_script_type): """List all Script by Script Type. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘script’: [{‘id’: < id >, ‘tipo_rotei...
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 >...
entailment
def listar_por_equipamento(self, id_equipment): """List all Script related Equipment. :param id_equipment: Identifier of the Equipment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {script': [{‘id’: < id >, ‘nome’: ...
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 >, ...
entailment
def get_rule_by_id(self, rule_id): """Get rule by indentifier. :param rule_id: Rule identifier :return: Dictionary with the following structure: :: {'rule': {'environment': < environment_id >, 'content': < content >, 'custom': < custom >, ...
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 >}...
entailment
def create_networks(self, ids, id_vlan): """Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing """ network_map = dict() network_map['ids'] = ids network_map['id_vlan'] = id_vlan c...
Set column 'active = 1' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing
entailment
def add_network(self, network, id_vlan, id_network_type, id_environment_vip=None, cluster_unit=None): """ Add new network :param network: IPV4 or IPV6 (ex.: "10.0.0.3/24") :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_...
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...
entailment
def edit_network(self, id_network, ip_type, id_net_type, id_env_vip=None, cluster_unit=None): """ Edit a network 4 or 6 :param id_network: Identifier of the Network. Integer value and greater than zero. :param id_net_type: Identifier of the NetworkType. Integer value and greater than ze...
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...
entailment
def get_network_ipv4(self, id_network): """ Get networkipv4 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
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...
entailment
def get_network_ipv6(self, id_network): """ Get networkipv6 :param id_network: Identifier of the Network. Integer value and greater than zero. :return: Following dictionary: :: {'network': {'id': < id_networkIpv6 >, 'network_type': < id_tipo_rede >, ...
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...
entailment
def deallocate_network_ipv4(self, id_network_ipv4): """ Deallocate all relationships between NetworkIPv4. :param id_network_ipv4: ID for NetworkIPv4 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv4. :raise NetworkIPv4NotFoundError: NetworkIPv4 ...
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...
entailment
def add_network_ipv6( self, id_vlan, id_tipo_rede, id_ambiente_vip=None, prefix=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of the ...
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...
entailment
def add_network_ipv6_hosts( self, id_vlan, id_tipo_rede, num_hosts, id_ambiente_vip=None): """ Add new networkipv6 :param id_vlan: Identifier of the Vlan. Integer value and greater than zero. :param id_tipo_rede: Identifier of ...
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...
entailment
def deallocate_network_ipv6(self, id_network_ipv6): """ Deallocate all relationships between NetworkIPv6. :param id_network_ipv6: ID for NetworkIPv6 :return: Nothing :raise InvalidParameterError: Invalid ID for NetworkIPv6. :raise NetworkIPv6NotFoundError: NetworkIPv6 ...
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...
entailment
def remove_networks(self, ids): """ Set column 'active = 0' in tables redeipv4 and redeipv6] :param ids: ID for NetworkIPv4 and/or NetworkIPv6 :return: Nothing :raise NetworkInactiveError: Unable to remove the network because it is inactive. :raise InvalidParameterErro...
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...
entailment
def add(self, networkipv4_id, ipv4_id): """List all DHCPRelayIPv4. :param: networkipv4_id, ipv4_id :return: Following dictionary: { "networkipv4": <networkipv4_id>, "id": <id>, "ipv4": { "oct4": <oct4>, "oct2": <oct2>, ...
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>...
entailment
def list(self, networkipv4=None, ipv4=None): """List all DHCPRelayIPv4. :param: networkipv4: networkipv4 id - list all dhcprelay filtering by networkipv4 id ipv4: ipv4 id - list all dhcprelay filtering by ipv4 id :return: Following dictionary: [ { "n...
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>, ...
entailment
def add(self, networkipv6_id, ipv6_id): """List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, ...
List all DHCPRelayIPv4. :param: Object DHCPRelayIPv4 :return: Following dictionary: { "networkipv6": <networkipv4_id>, "id": <id>, "ipv6": { "block1": <block1>, "block2": <block2>, "block3": <block3>, "bloc...
entailment
def list(self, networkipv6=None, ipv6=None): """List all DHCPRelayIPv6. :param: networkipv6: networkipv6 id - list all dhcprelay filtering by networkipv6 id ipv6: ipv6 id - list all dhcprelay filtering by ipv6 id :return: Following dictionary: [ { "n...
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>, ...
entailment
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
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...
entailment
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v3/ipv6/%s/', ids) return super(ApiIPv6, self).delete(url)
Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None
entailment
def update(self, ipv6s): """ Method to update ipv6's :param ipv6s: List containing ipv6's desired to updated :return: None """ data = {'ips': ipv6s} ipv6s_ids = [str(ipv6.get('id')) for ipv6 in ipv6s] return super(ApiIPv6, self).put('api/v3/ipv6/%s/' % ...
Method to update ipv6's :param ipv6s: List containing ipv6's desired to updated :return: None
entailment
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiIPv6, self).post('api/v3/ipv6/', data)
Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None
entailment
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
entailment
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v3/ipv4/%s/', ids) return super(ApiIPv4, self).delete(url)
Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None
entailment
def update(self, ipv4s): """ Method to update ipv4's :param ipv4s: List containing ipv4's desired to updated :return: None """ data = {'ips': ipv4s} ipv4s_ids = [str(ipv4.get('id')) for ipv4 in ipv4s] return super(ApiIPv4, self).put('api/v3/ipv4/%s/' % ...
Method to update ipv4's :param ipv4s: List containing ipv4's desired to updated :return: None
entailment
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiIPv4, self).post('api/v3/ipv4/', data)
Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None
entailment
def search(self, **kwargs): """ Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array con...
Method to search object group permissions general based on extends search. :param search: Dict containing QuerySets to find object group permissions general. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :...
entailment
def delete(self, ids): """ Method to delete object group permissions general by their ids :param ids: Identifiers of object group permissions general :return: None """ url = build_uri_with_ids('api/v3/object-group-perm-general/%s/', ids) return super(ApiObjectGro...
Method to delete object group permissions general by their ids :param ids: Identifiers of object group permissions general :return: None
entailment
def update(self, ogpgs): """ Method to update object group permissions general :param ogpgs: List containing object group permissions general desired to updated :return: None """ data = {'ogpgs': ogpgs} ogpgs_ids = [str(ogpg.get('id')) for ogpg in ogpgs] ...
Method to update object group permissions general :param ogpgs: List containing object group permissions general desired to updated :return: None
entailment
def create(self, ogpgs): """ Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None """ data = {'ogpgs': ogpgs} return super(ApiObjectGroupPermissionGeneral, self).post('api/v3/object-g...
Method to create object group permissions general :param ogpgs: List containing vrf desired to be created on database :return: None
entailment
def search(self, **kwargs): """ Method to search ipv6's based on extends search. :param search: Dict containing QuerySets to find ipv6's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
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...
entailment
def delete(self, ids): """ Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None """ url = build_uri_with_ids('api/v4/ipv6/%s/', ids) return super(ApiV4IPv6, self).delete(url)
Method to delete ipv6's by their ids :param ids: Identifiers of ipv6's :return: None
entailment
def create(self, ipv6s): """ Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None """ data = {'ips': ipv6s} return super(ApiV4IPv6, self).post('api/v4/ipv6/', data)
Method to create ipv6's :param ipv6s: List containing vrf desired to be created on database :return: None
entailment
def add(self, tipo_opcao, nome_opcao_txt): """Inserts a new Option VIP and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] ...
Inserts a new Option VIP and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: ...
entailment
def alter(self, id_option_vip, tipo_opcao, nome_opcao_txt): """Change Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :para...
Change Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters a...
entailment
def remove(self, id_option_vip): """Remove Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option VIP identifier is null and invalid. :raise OptionVipNotFoun...
Remove Option VIP from by the identifier. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option VIP identifier is null and invalid. :raise OptionVipNotFoundError: Option VIP not registered. :...
entailment
def get_option_vip(self, id_environment_vip): """Get all Option VIP by Environment Vip. :return: Dictionary with the following structure: :: {‘option_vip’: [{‘id’: < id >, ‘tipo_opcao’: < tipo_opcao >, ‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option v...
Get all Option VIP by Environment Vip. :return: Dictionary with the following structure: :: {‘option_vip’: [{‘id’: < id >, ‘tipo_opcao’: < tipo_opcao >, ‘nome_opcao_txt’: < nome_opcao_txt >}, ... too option vips ...] } :raise EnvironmentVipNotFoundError: E...
entailment
def associate(self, id_option_vip, id_environment_vip): """Create a relationship of OptionVip with EnvironmentVip. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater tha...
Create a relationship of OptionVip with EnvironmentVip. :param id_option_vip: Identifier of the Option VIP. Integer value and greater than zero. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero. :return: Following dictionary :: ...
entailment
def buscar_timeout_opcvip(self, id_ambiente_vip): """Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id :return: Dictionary with the following structure: :: {‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>} :raise InvalidParameterErr...
Buscar nome_opcao_txt das Opcoes VIp quando tipo_opcao = 'Timeout' pelo environmentvip_id :return: Dictionary with the following structure: :: {‘timeout_opt’: ‘timeout_opt’: <'nome_opcao_txt'>} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :...
entailment
def buscar_rules(self, id_ambiente_vip, id_vip=''): """Search rules ​by environmentvip_id :return: Dictionary with the following structure: :: {'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]} :raise InvalidParameterError: Environment VIP identifier is null ...
Search rules ​by environmentvip_id :return: Dictionary with the following structure: :: {'name_rule_opt': [{'name_rule_opt': <name>, 'id': <id>}, ...]} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNotFoundError: Enviro...
entailment
def buscar_healthchecks(self, id_ambiente_vip): """Search healthcheck ​by environmentvip_id :return: Dictionary with the following structure: :: {'healthcheck_opt': [{'name': <name>, 'id': <id>},...]} :raise InvalidParameterError: Environment VIP identifier is null and in...
Search healthcheck ​by environmentvip_id :return: Dictionary with the following structure: :: {'healthcheck_opt': [{'name': <name>, 'id': <id>},...]} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNotFoundError: Environm...
entailment
def buscar_idtrafficreturn_opcvip(self, nome_opcao_txt): """Search id of Option VIP when tipo_opcao = 'Retorno de trafego' ​​ :return: Dictionary with the following structure: :: {‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>} :raise InvalidParameterError: Environment ...
Search id of Option VIP when tipo_opcao = 'Retorno de trafego' ​​ :return: Dictionary with the following structure: :: {‘trafficreturn_opt’: ‘trafficreturn_opt’: <'id'>} :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNot...
entailment
def listar_por_marca(self, id_brand): """List all Model by Brand. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘model’: [{‘id’: < id >, ‘nome’: < nome >, ‘id_ma...
List all Model by Brand. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: Dictionary with the following structure: :: {‘model’: [{‘id’: < id >, ‘nome’: < nome >, ‘id_marca’: < id_marca >}, ... too Model ...]} ...
entailment
def inserir(self, id_brand, name): """Inserts a new Model and returns its identifier :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following stru...
Inserts a new Model and returns its identifier :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'model': {'id...
entailment
def alterar(self, id_model, id_brand, name): """Change Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minim...
Change Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Model name. String with a minimum 3 and maximum of 100 characters :return: Non...
entailment
def remover(self, id_model): """Remove Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Model is null and invalid. :raise ModeloEquipamentoNaoExisteError: ...
Remove Model from by the identifier. :param id_model: Identifier of the Model. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Model is null and invalid. :raise ModeloEquipamentoNaoExisteError: Model not registered. :raise Mod...
entailment
def listar_por_equipamento(self, id_equipamento): """List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, ...
List all interfaces of an equipment. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interface': [{'protegida': < protegida >, 'nome': < nome >, 'id_ligacao_front': < id_ligacao_front >, 'id...
entailment
def get_by_id(self, id_interface): """Get an interface by id. :param id_interface: Interface identifier. :return: Following dictionary: :: {'interface': {'id': < id >, 'interface': < interface >, 'descricao': < descricao >, 'protegida':...
Get an interface by id. :param id_interface: Interface identifier. :return: Following dictionary: :: {'interface': {'id': < id >, 'interface': < interface >, 'descricao': < descricao >, 'protegida': < protegida >, 'tipo_equip': < id...
entailment
def inserir( self, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, id_equipamento, tipo=None, vlan=None): """Insert new interface for an equipment. :param nome: Interface name. ...
Insert new interface for an equipment. :param nome: Interface name. :param protegida: Indication of protected ('0' or '1'). :param descricao: Interface description. :param id_ligacao_front: Front end link interface identifier. :param id_ligacao_back: Back end link interface iden...
entailment
def alterar( self, id_interface, nome, protegida, descricao, id_ligacao_front, id_ligacao_back, tipo=None, vlan=None): """Edit an interface by its identifier. Equipment identifier is not changed....
Edit an interface by its identifier. Equipment identifier is not changed. :param nome: Interface name. :param protegida: Indication of protected ('0' or '1'). :param descricao: Interface description. :param id_ligacao_front: Front end link interface identifier. :param i...
entailment
def remover(self, id_interface): """Remove an interface by its identifier. :param id_interface: Interface identifier. :return: None :raise InterfaceNaoExisteError: Interface doesn't exist. :raise InterfaceError: Interface is linked to another interface. :raise InvalidP...
Remove an interface by its identifier. :param id_interface: Interface identifier. :return: None :raise InterfaceNaoExisteError: Interface doesn't exist. :raise InterfaceError: Interface is linked to another interface. :raise InvalidParameterError: The interface identifier is i...
entailment
def remove_connection(self, id_interface, back_or_front): """ Remove a connection between two interfaces :param id_interface: One side of relation :param back_or_front: This side of relation is back(0) or front(1) :return: None :raise InterfaceInvalidBackFrontError: Fr...
Remove a connection between two interfaces :param id_interface: One side of relation :param back_or_front: This side of relation is back(0) or front(1) :return: None :raise InterfaceInvalidBackFrontError: Front or Back of interfaces not match to remove connection :raise Invali...
entailment
def list_connections(self, nome_interface, id_equipamento): """List interfaces linked to back and front of specified interface. :param nome_interface: Interface name. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interfa...
List interfaces linked to back and front of specified interface. :param nome_interface: Interface name. :param id_equipamento: Equipment identifier. :return: Dictionary with the following: :: {'interfaces':[ {'id': < id >, 'interface': < nome >, 'd...
entailment
def list_all(self): """List all Permission. :return: Dictionary with the following structure: :: {'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Netwo...
List all Permission. :return: Dictionary with the following structure: :: {'perms': [{ 'function' < function >, 'id': < id > }, ... more permissions ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XM...
entailment
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
entailment
def delete(self, ids): """ Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None """ url = build_uri_with_ids('api/v4/ipv4/%s/', ids) return super(ApiV4IPv4, self).delete(url)
Method to delete ipv4's by their ids :param ids: Identifiers of ipv4's :return: None
entailment
def create(self, ipv4s): """ Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None """ data = {'ips': ipv4s} return super(ApiV4IPv4, self).post('api/v4/ipv4/', data)
Method to create ipv4's :param ipv4s: List containing ipv4's desired to be created on database :return: None
entailment
def provisionar(self, equipamentos, vips): """Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs ger...
Realiza a inserção ou alteração de um grupo virtual para o sistema de Orquestração de VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs gerada pelo método "add_vip" da classe "EspecificacaoGrup...
entailment
def remover_provisionamento(self, equipamentos, vips): """Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de...
Remove o provisionamento de um grupo virtual para o sistema de Orquestração VM. :param equipamentos: Lista de equipamentos gerada pelo método "add_equipamento_remove" da classe "EspecificacaoGrupoVirtual". :param vips: Lista de VIPs gerada pelo método "add_vip_remove" da classe "Especificacao...
entailment
def list_with_usergroup(self): """List all users and their user groups. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, ...
List all users and their user groups. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, 'pwd': < pwd >, 'user': < us...
entailment
def get_by_user_ldap(self, user_name): """Get user by the ldap name. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, '...
Get user by the ldap name. is_more -If more than 3 of groups of users or no, to control expansion Screen. :return: Dictionary with the following structure: :: {'usuario': [{'nome': < nome >, 'id': < id >, 'pwd': < pwd >, 'user': < user >, ...
entailment
def inserir(self, user, pwd, name, email, user_ldap): """Inserts a new User and returns its identifier. The user will be created with active status. :param user: Username. String with a minimum 3 and maximum of 45 characters :param pwd: User password. String with a minimum 3 and maximu...
Inserts a new User and returns its identifier. The user will be created with active status. :param user: Username. String with a minimum 3 and maximum of 45 characters :param pwd: User password. String with a minimum 3 and maximum of 45 characters :param name: User name. String with a ...
entailment
def alterar(self, id_user, user, password, nome, ativo, email, user_ldap): """Change User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user: Username. String with a minimum 3 and maximum of 45 characters :param password: Use...
Change User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :param nome: ...
entailment
def change_password(self, id_user, user_current_password, password): """Change password of User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user_current_password: Senha atual do usuário. :param password: Nova Senha do usuár...
Change password of User from by the identifier. :param id_user: Identifier of the User. Integer value and greater than zero. :param user_current_password: Senha atual do usuário. :param password: Nova Senha do usuário. :return: None :raise UsuarioNaoExisteError: User not regis...
entailment
def authenticate(self, username, password, is_ldap_user): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :re...
Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Following dictionary: :: {'user': {'id': ...
entailment
def authenticate_ldap(self, username, password): """Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Fol...
Get user by username and password and their permissions. :param username: Username. String with a minimum 3 and maximum of 45 characters :param password: User password. String with a minimum 3 and maximum of 45 characters :return: Following dictionary: :: {'user': {'id': ...
entailment
def listar(self): """List all access types. :return: Dictionary with structure: :: {‘tipo_acesso’: [{‘id’: < id >, ‘protocolo’: < protocolo >}, ... other access types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError...
List all access types. :return: Dictionary with structure: :: {‘tipo_acesso’: [{‘id’: < id >, ‘protocolo’: < protocolo >}, ... other access types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to genera...
entailment
def inserir(self, protocolo): """Insert new access type and returns its identifier. :param protocolo: Protocol. :return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}} :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: ...
Insert new access type and returns its identifier. :param protocolo: Protocol. :return: Dictionary with structure: {‘tipo_acesso’: {‘id’: < id >}} :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: Protocol value is invalid or none. ...
entailment
def alterar(self, id_tipo_acesso, protocolo): """Edit access type by its identifier. :param id_tipo_acesso: Access type identifier. :param protocolo: Protocol. :return: None :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError...
Edit access type by its identifier. :param id_tipo_acesso: Access type identifier. :param protocolo: Protocol. :return: None :raise ProtocoloTipoAcessoDuplicadoError: Protocol already exists. :raise InvalidParameterError: Protocol value is invalid or none. :raise TipoA...
entailment
def remover(self, id_tipo_acesso): """Removes access type by its identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise TipoAcessoError: Access type associated with equipment, cannot be removed. :raise InvalidParameterError: Protocol value is invalid o...
Removes access type by its identifier. :param id_tipo_acesso: Access type identifier. :return: None :raise TipoAcessoError: Access type associated with equipment, cannot be removed. :raise InvalidParameterError: Protocol value is invalid or none. :raise TipoAcessoNaoExisteErro...
entailment
def inserir(self, type, description): """Inserts a new Script Type and returns its identifier. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maximum of 100 characters :return:...
Inserts a new Script Type and returns its identifier. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: ...
entailment
def alterar(self, id_script_type, type, description): """Change Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param descr...
Change Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :param type: Script Type type. String with a minimum 3 and maximum of 40 characters :param description: Script Type description. String with a minimum 3 and maxi...
entailment
def remover(self, id_script_type): """Remove Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script Type is null and invalid. :raise Tip...
Remove Script Type from by the identifier. :param id_script_type: Identifier of the Script Type. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Script Type is null and invalid. :raise TipoRoteiroNaoExisteError: Script Type not regist...
entailment
def pool_by_environmentvip(self, environment_vip_id): """ Method to return list object pool by environment vip id Param environment_vip_id: environment vip id Return list object pool """ uri = 'api/v3/pool/environment-vip/%s/' % environment_vip_id return super(A...
Method to return list object pool by environment vip id Param environment_vip_id: environment vip id Return list object pool
entailment
def pool_by_id(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/%s/' % pool_id return super(ApiPool, self).get(uri)
Method to return object pool by id Param pool_id: pool id Returns object pool
entailment
def get_pool_details(self, pool_id): """ Method to return object pool by id Param pool_id: pool id Returns object pool """ uri = 'api/v3/pool/details/%s/' % pool_id return super(ApiPool, self).get(uri)
Method to return object pool by id Param pool_id: pool id Returns object pool
entailment
def search(self, **kwargs): """ Method to search pool's based on extends search. :param search: Dict containing QuerySets to find pool's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
Method to search pool's based on extends search. :param search: Dict containing QuerySets to find pool's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
entailment
def delete(self, ids): """ Method to delete pool's by their ids :param ids: Identifiers of pool's :return: None """ url = build_uri_with_ids('api/v3/pool/%s/', ids) return super(ApiPool, self).delete(url)
Method to delete pool's by their ids :param ids: Identifiers of pool's :return: None
entailment
def update(self, pools): """ Method to update pool's :param pools: List containing pool's desired to updated :return: None """ data = {'server_pools': pools} pools_ids = [str(pool.get('id')) for pool in pools] return super(ApiPool, ...
Method to update pool's :param pools: List containing pool's desired to updated :return: None
entailment
def create(self, pools): """ Method to create pool's :param pools: List containing pool's desired to be created on database :return: None """ data = {'server_pools': pools} return super(ApiPool, self).post('api/v3/pool/', data)
Method to create pool's :param pools: List containing pool's desired to be created on database :return: None
entailment
def get_real_related(self, id_equip): """ Find reals related with equipment :param id_equip: Identifier of equipment :return: Following dictionary: :: {'vips': [{'port_real': < port_real >, 'server_pool_member_id': < server_pool_member_id >, ...
Find reals related with equipment :param id_equip: Identifier of equipment :return: Following dictionary: :: {'vips': [{'port_real': < port_real >, 'server_pool_member_id': < server_pool_member_id >, 'ip': < ip >, 'port_vip': < port_vip >, ...
entailment
def find_equips( self, name, iexact, environment, equip_type, group, ip, pagination): """ Find vlans by all search parameters :param name: Filter by vlan name column :param iexact: Filter by ...
Find vlans by all search parameters :param name: Filter by vlan name column :param iexact: Filter by name will be exact? :param environment: Filter by environment ID related :param equip_type: Filter by equipment_type ID related :param group: Filter by equipment group ID related...
entailment
def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False): """Inserts a new Equipment and returns its identifier Além de inserir o equipamento, a networkAPI também associa o equipamento ao grupo informado. :param name: Equipment name. String with a minimum 3 and...
Inserts a new Equipment and returns its identifier Além de inserir o equipamento, a networkAPI também associa o equipamento ao grupo informado. :param name: Equipment name. String with a minimum 3 and maximum of 30 characters :param id_equipment_type: Identifier of the Equipment Type. ...
entailment
def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None): """Change Equipment from by the identifier. :param id_equip: Identifier of the Equipment. Integer value and greater than zero. :param nome: Equipment name. String with a minimum 3 and maximum of 30 characters ...
Change Equipment from by the identifier. :param id_equip: Identifier of the Equipment. Integer value and greater than zero. :param nome: Equipment name. String with a minimum 3 and maximum of 30 characters :param id_tipo_equipamento: Identifier of the Equipment Type. Integer value and greater t...
entailment
def criar_ip(self, id_vlan, id_equipamento, descricao): """Aloca um IP em uma VLAN para um equipamento. Insere um novo IP para a VLAN e o associa ao equipamento. :param id_vlan: Identificador da vlan. :param id_equipamento: Identificador do equipamento. :param descricao: Descri...
Aloca um IP em uma VLAN para um equipamento. Insere um novo IP para a VLAN e o associa ao equipamento. :param id_vlan: Identificador da vlan. :param id_equipamento: Identificador do equipamento. :param descricao: Descriçao do IP. :return: Dicionário com a seguinte estrutura: ...
entailment
def add_ipv4(self, id_network_ipv4, id_equipamento, descricao): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv4: ID for NetworkIPv4. :param id_equipamento: ID for Equipment. :param descricao: Descrip...
Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv4: ID for NetworkIPv4. :param id_equipamento: ID for Equipment. :param descricao: Description for IP. :return: Following dictionary: :: ...
entailment
def add_ipv6(self, id_network_ipv6, id_equip, description): """Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for...
Allocate an IP on a network to an equipment. Insert new IP for network and associate to the equipment :param id_network_ipv6: ID for NetworkIPv6. :param id_equip: ID for Equipment. :param description: Description for IP. :return: Following dictionary: :: {...
entailment
def remover_ip(self, id_equipamento, id_ip): """Removes association of IP and Equipment. If IP has no other association with equipments, IP is also removed. :param id_equipamento: Equipment identifier :param id_ip: IP identifier. :return: None :raise VipIpError: Ip can...
Removes association of IP and Equipment. If IP has no other association with equipments, IP is also removed. :param id_equipamento: Equipment identifier :param id_ip: IP identifier. :return: None :raise VipIpError: Ip can't be removed because there is a created Vip Request. ...
entailment
def associate_ipv6(self, id_equip, id_ipv6): """Associates an IPv6 to a equipament. :param id_equip: Identifier of the equipment. Integer value and greater than zero. :param id_ipv6: Identifier of the ip. Integer value and greater than zero. :return: Dictionary with the following struc...
Associates an IPv6 to a equipament. :param id_equip: Identifier of the equipment. Integer value and greater than zero. :param id_ipv6: Identifier of the ip. Integer value and greater than zero. :return: Dictionary with the following structure: {'ip_equipamento': {'id': < id_ip_do_e...
entailment
def listar_por_tipo_ambiente(self, id_tipo_equipamento, id_ambiente): """Lista os equipamentos de um tipo e que estão associados a um ambiente. :param id_tipo_equipamento: Identificador do tipo do equipamento. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seg...
Lista os equipamentos de um tipo e que estão associados a um ambiente. :param id_tipo_equipamento: Identificador do tipo do equipamento. :param id_ambiente: Identificador do ambiente. :return: Dicionário com a seguinte estrutura: :: {'equipamento': [{'id': < id_equipament...
entailment
def listar_por_nome(self, nome): """Obtém um equipamento a partir do seu nome. :param nome: Nome do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equi...
Obtém um equipamento a partir do seu nome. :param nome: Nome do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equipamento': < id_tipo_equipamento >, ...
entailment
def listar_por_id(self, id): """Obtém um equipamento a partir do seu identificador. :param id: ID do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equ...
Obtém um equipamento a partir do seu identificador. :param id: ID do equipamento. :return: Dicionário com a seguinte estrutura: :: {'equipamento': {'id': < id_equipamento >, 'nome': < nome_equipamento >, 'id_tipo_equipamento': < id_tipo_equipamento >, ...
entailment
def list_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLE...
Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to gene...
entailment
def get_all(self): """Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLErr...
Return all equipments in database :return: Dictionary with the following structure: :: {'equipaments': {'name' :< name_equipament >}, {... demais equipamentos ...} } :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to gener...
entailment
def remover(self, id_equipamento): """Remove um equipamento a partir do seu identificador. Além de remover o equipamento, a API também remove: - O relacionamento do equipamento com os tipos de acessos. - O relacionamento do equipamento com os roteiros. - O relaciona...
Remove um equipamento a partir do seu identificador. Além de remover o equipamento, a API também remove: - O relacionamento do equipamento com os tipos de acessos. - O relacionamento do equipamento com os roteiros. - O relacionamento do equipamento com os IPs. -...
entailment
def associar_grupo(self, id_equipamento, id_grupo_equipamento): """Associa um equipamento a um grupo. :param id_equipamento: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equ...
Associa um equipamento a um grupo. :param id_equipamento: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipamento_grupo':{'id': < id_equip_do_grupo >}} :raise GrupoEquipam...
entailment
def remover_grupo(self, id_equipamento, id_grupo): """Remove a associação de um equipamento com um grupo de equipamento. :param id_equipamento: Identificador do equipamento. :param id_grupo: Identificador do grupo de equipamento. :return: None :raise EquipamentoGrupoNaoExisteE...
Remove a associação de um equipamento com um grupo de equipamento. :param id_equipamento: Identificador do equipamento. :param id_grupo: Identificador do grupo de equipamento. :return: None :raise EquipamentoGrupoNaoExisteError: Associação entre grupo e equipamento não cadastrada. ...
entailment