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