text
stringlengths
81
112k
Get environments by template name :param name: Template name. :param network: IPv4 or IPv6. :return: Following dictionary: :: {'ambiente': [divisao_dc - ambiente_logico - grupo_l3, other envs...] } :raise InvalidParameterError: Invalid param. :raise DataB...
Save blocks from environment :param id_env: Environment id :param blocks: Lists of blocks in order. Ex: ['content one', 'content two', ...] :return: None :raise AmbienteNaoExisteError: Ambiente não cadastrado. :raise InvalidValueError: Invalid parameter. :raise UserNot...
Get a rule by its identifier :param id_rule: Rule identifier. :return: Seguinte estrutura :: { 'rule': {'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'custom': < custom > }} ...
Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...] :return: None ...
Save an environment rule :param name: Name of the rule :param id_env: Environment id :param contents: Lists of contents in order. Ex: ['content one', 'content two', ...] :param blocks_id: Lists of blocks id or 0 if is as custom content. Ex: ['0', '5', '0' ...] :param id_rule: Ru...
Save an environment rule :param id_env: Environment id :return: Estrutura: :: { 'rules': [{'id': < id >, 'environment': < Environment Object >, 'content': < content >, 'name': < name >, 'custom': < custom > },... ]} :raise ...
Add new prefix configuration :param id_environment: Identifier of the Environment. Integer value and greater than zero. :param network: Network Ipv4 or Ipv6. :param prefix: Prefix 0-32 to Ipv4 or 0-128 to Ipv6. :param ip_version: v4 to IPv4 or v6 to IPv6 :param network_type: typ...
List all prefix configurations by environment in DB :return: Following dictionary: :: {'lists_configuration': [{ 'id': <id_ipconfig>, 'subnet': <subnet>, 'type': <type>, 'new_prefix': <new_prefix>, }, ... ]} :raise Inva...
Remove Prefix Configuration :return: None :raise InvalidValueError: Invalid Id for Environment or IpConfig. :raise IPConfigNotFoundError: Ipconfig not resgistred. :raise AmbienteNotFoundError: Environment not registered. :raise DataBaseError: Failed into networkapi access data ...
Associate a news Environment on Environment VIP and returns its identifier. :param environment_id: Identifier of the Environment. Integer value and greater than zero. :param environment_vip_id: Identifier of the Environment VIP. Integer value and greater than zero. :return: Following dictionar...
Get all Environment by Environment Vip. :return: Following dictionary: :: {'ambiente': [{ 'id': <id_environment>, 'grupo_l3': <id_group_l3>, 'grupo_l3_name': <name_group_l3>, 'ambiente_logico': <id_logical_environment>, 'ambiente_logico_name...
Return list environments related with environment vip def get_equipment(self, **kwargs): """ Return list environments related with environment vip """ uri = 'api/v3/equipment/' uri = self.prepare_url(uri, kwargs) return super(ApiEquipment, self).get(uri)
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/v3/e...
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...
Method to undeploy pool's by their ids :param ids: Identifiers of deployed pool's :return: Empty Dict def delete(self, ids): """ Method to undeploy pool's by their ids :param ids: Identifiers of deployed pool's :return: Empty Dict """ url = build_uri_wi...
Method to deploy pool's :param pools: Identifiers of pool's desired to be deployed :return: Empty Dict def create(self, ids): """ Method to deploy pool's :param pools: Identifiers of pool's desired to be deployed :return: Empty Dict """ url = build_uri...
Execute the script 'gerador_vips' several times with options -real, -add and -del to adjust vip request reals. :param id_vip: Identifier of the VIP. Integer value and greater than zero. :param method_bal: method_bal. :param reals: List of reals. Ex: [{'real_name':'Teste1', 'real_ip':'10.10.10.1'...
Inserts a new Brand and returns its identifier :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: Dictionary with the following structure: :: {'marca': {'id': < id_brand >}} :raise InvalidParameterError: Name is null and invalid. ...
Change Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :param name: Brand name. String with a minimum 3 and maximum of 100 characters :return: None :raise InvalidParameterError: The identifier of Brand or name is null and in...
Remove Brand from by the identifier. :param id_brand: Identifier of the Brand. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Brand is null and invalid. :raise MarcaNaoExisteError: Brand not registered. :raise MarcaError: The...
Remove Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanException: Invalid id for Vlan. :raise NetworkAPIException: Fai...
Save Acl draft by type :param id_vlan: Identity of Vlan :param type_acl: Acl type v4 or v6 :return: None :raise VlanDoesNotExistException: Vlan Does Not Exist. :raise InvalidIdVlanException: Invalid id for Vlan. :raise NetworkAPIException: Faile...
Method to search vlan's based on extends search. :param search: Dict containing QuerySets to find vlan's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override d...
Method to delete vlan's by their ids :param ids: Identifiers of vlan's :return: None def delete(self, ids): """ Method to delete vlan's by their ids :param ids: Identifiers of vlan's :return: None """ url = build_uri_with_ids('api/v3/vlan/%s/', ids) ...
Method to update vlan's :param vlans: List containing vlan's desired to updated :return: None def update(self, vlans): """ Method to update vlan's :param vlans: List containing vlan's desired to updated :return: None """ data = {'vlans': vlans} ...
Method to create vlan's :param vlans: List containing vlan's desired to be created on database :return: None def create(self, vlans): """ Method to create vlan's :param vlans: List containing vlan's desired to be created on database :return: None """ d...
Verifica se o parâmetro é um valor inteiro válido. :param param: Valor para ser validado. :return: True se o parâmetro tem um valor inteiro válido, ou False, caso contrário. def is_valid_int_param(param): """Verifica se o parâmetro é um valor inteiro válido. :param param: Valor para ser validado. ...
Verifica se address é um endereço ip válido. O valor é considerado válido se tiver no formato XXX.XXX.XXX.XXX, onde X é um valor entre 0 e 9. :param address: Endereço IP. :return: True se o parâmetro é um IP válido, ou False, caso contrário. def is_valid_ip(address): """Verifica se address é um ende...
Checks if the parameter is a valid ip version value. :param param: Value to be validated. :return: True if the parameter has a valid ip version value, or False otherwise. def is_valid_version_ip(param): """Checks if the parameter is a valid ip version value. :param param: Value to be validated. ...
List Option Vip by Environment Vip param environment_vip_id: Id of Environment Vip def option_vip_by_environmentvip(self, environment_vip_id): """ List Option Vip by Environment Vip param environment_vip_id: Id of Environment Vip """ uri = 'api/v3/option-vip/environme...
Method to get details of vip request param vip_request_id: vip_request id def get_vip_request_details(self, vip_request_id): """ Method to get details of vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/details/%s/' % vip_request_id ...
Method to get vip request param vip_request_id: vip_request id def get_vip_request(self, vip_request_id): """ Method to get vip request param vip_request_id: vip_request id """ uri = 'api/v3/vip-request/%s/' % vip_request_id return super(ApiVipRequest, self).g...
Method to list vip request param search: search def search_vip_request(self, search): """ Method to list vip request param search: search """ uri = 'api/v3/vip-request/?%s' % urllib.urlencode({'search': search}) return super(ApiVipRequest, self).get(uri)
Method to save vip request param vip_request: vip_request object def save_vip_request(self, vip_request): """ Method to save vip request param vip_request: vip_request object """ uri = 'api/v3/vip-request/' data = dict() data['vips'] = list() d...
Method to update vip request param vip_request: vip_request object param vip_request_id: vip_request id def update_vip_request(self, vip_request, vip_request_id): """ Method to update vip request param vip_request: vip_request object param vip_request_id: vip_request i...
Method to delete vip request param vip_request_ids: vip_request ids def delete_vip_request(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/%s/' % vip_request_ids return super(ApiVipR...
Method to create vip request param vip_request_ids: vip_request ids def create_vip(self, vip_request_ids): """ Method to create vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRe...
Method to delete vip request param vip_request_ids: vip_request ids def remove_vip(self, vip_request_ids): """ Method to delete vip request param vip_request_ids: vip_request ids """ uri = 'api/v3/vip-request/deploy/%s/' % vip_request_ids return super(ApiVipRe...
Method to search vip's based on extends search. :param search: Dict containing QuerySets to find vip's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing fields to override def...
Method to delete vip's by their id's :param ids: Identifiers of vip's :return: None def delete(self, ids): """ Method to delete vip's by their id's :param ids: Identifiers of vip's :return: None """ url = build_uri_with_ids('api/v3/vip-request/%s/', ids...
Method to update vip's :param vips: List containing vip's desired to updated :return: None def update(self, vips): """ Method to update vip's :param vips: List containing vip's desired to updated :return: None """ data = {'vips': vips} vips_ids...
Method to create vip's :param vips: List containing vip's desired to be created on database :return: None def create(self, vips): """ Method to create vip's :param vips: List containing vip's desired to be created on database :return: None """ data = {...
Method to deploy vip's :param vips: List containing vip's desired to be deployed on equipment :return: None def deploy(self, ids): """ Method to deploy vip's :param vips: List containing vip's desired to be deployed on equipment :return: None """ url = ...
Method to undeploy vip's :param vips: List containing vip's desired to be undeployed on equipment :return: None def undeploy(self, ids, clean_up=0): """ Method to undeploy vip's :param vips: List containing vip's desired to be undeployed on equipment :return: None ...
Inserts a new Option Pool and returns its identifier. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: ...
Change Option Pool from by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param tipo_opcao: Type. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param nome_opcao_txt: Name Option. String with a maximum of 50 characters and respec...
Remove Option pool by identifier and all Environment related . :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: None :raise InvalidParameterError: Option Pool identifier is null and invalid. :raise optionpoolNotFoundError: Option Po...
Search Option Pool by id. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :return: Following dictionary: :: {‘id’: < id_option_pool >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >} :raise InvalidPar...
Get all Option Pool. :return: Dictionary with the following structure: :: {[{‘id’: < id >, ‘type’: < tipo_opcao >, ‘name’: < nome_opcao_txt >}, ... other option pool ...] } :raise optionpoolNotFoundError: Option Pool not registered. :raise DataBase...
Get all Option VIP by Environment . :return: Dictionary with the following structure: :: {[{‘id’: < id >, option: { 'id': <id> 'type':<type> 'name':<name> } environment: { 'id':...
Create a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment . Integer value and greater than zero. :return: Dictionary with the following structure: ...
Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and greater than zero. :return: { 'id': < environment_option_id> } ...
Remove a relationship of optionpool with Environment. :param id_option_pool: Identifier of the Option Pool. Integer value and greater than zero. :param id_environment: Identifier of the Environment Pool. Integer value and greater than zero. :return: Dictionary with the following struct...
Inserts a new Filter and returns its identifier. :param name: Name. String with a maximum of 100 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 200 characters and respect [a-zA-Z\_-] :return: Following dictionary: :: {'filter'...
Change Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :param name: Name. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param description: Description. String with a maximum of 50 characters and respect [a-zA-Z\_-] ...
Remove Filter by the identifier. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: None :raise InvalidParameterError: Filter identifier is null and invalid. :raise FilterNotFoundError: Filter not registered. :raise DataBaseError: Network...
Get filter by id. :param id_filter: Identifier of the Filter. Integer value and greater than zero. :return: Following dictionary: :: {‘filter’: {‘id’: < id >, ‘name’: < name >, ‘description’: < description >}} :raise InvalidParameterError: The val...
Create a relationship between Filter and TipoEquipamento. :param et_id: Identifier of TipoEquipamento. Integer value and greater than zero. :param id_filter: Identifier of Filter. Integer value and greater than zero. :return: Following dictionary: :: {'equiptype_filter_xr...
Removes relationship between Filter and TipoEquipamento. :param id_filter: Identifier of Filter. Integer value and greater than zero. :param id_eq_type: Identifier of TipoEquipamento. Integer value, greater than zero. :return: None :raise FilterNotFoundError: Filter not registered. ...
Search Group Equipament from by the identifier. :param id_egroup: Identifier of the Group Equipament. Integer value and greater than zero. :return: Following dictionary: :: {‘group_equipament’: {‘id’: < id_egrupo >, ‘nome’: < nome >} } :raise InvalidParamete...
Insere um novo grupo de equipamento e retorna o seu identificador. :param nome: Nome do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'grupo': {'id': < id >}} :raise InvalidParameterError: Nome do grupo é nulo ou vazio. :raise NomeGrupoEquipamentoDuplicadoError:...
Altera os dados de um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param nome: Nome do grupo de equipamento. :return: None :raise InvalidParameterError: O identificador e/ou o nome do grupo são nulos ou inválidos. ...
Remove um grupo de equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :return: None :raise GrupoEquipamentoNaoExisteError: Grupo de equipamento não cadastrado. :raise InvalidParameterError: O identificador do grupo é nulo ou inválido. ...
Associa um equipamento a um grupo. :param id_equip: Identificador do equipamento. :param id_grupo_equipamento: Identificador do grupo de equipamento. :return: Dicionário com a seguinte estrutura: {'equipamento_grupo':{'id': < id_equip_do_grupo >}} :raise GrupoEquipamentoNa...
Remove a associacao de um grupo de equipamento com um equipamento a partir do seu identificador. :param id_egrupo: Identificador do grupo de equipamento. :param id_equipamento: Identificador do equipamento. :return: None :raise EquipamentoNaoExisteError: Equipamento não cadastrado. ...
Inserts a new Logical Environment and returns its identifier. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: Dictionary with the following structure: :: {'logical_environment': {'id': < id_logical_environment >}} :rai...
Change Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :param name: Logical Environment name. String with a minimum 2 and maximum of 80 characters :return: None :raise InvalidParamete...
Remove Logical Environment from by the identifier. :param id_logicalenvironment: Identifier of the Logical Environment. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Logical Environment is null and invalid. :raise AmbienteLogicoNaoE...
Recebe o código e a descrição do erro da networkAPI e lança a exceção correspondente. :param code: Código de erro retornado pela networkAPI. :param description: Descrição do erro. :return: None def handle(cls, code, description): '''Recebe o código e a descrição do erro da networkAPI ...
Search Administrative Permission by Group User by identifier. :param id_ugroup: Identifier of the Group User. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'perms': [{'ugrupo': < ugrupo_id >, 'permission': { 'function' < function >, '...
Search Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :return: Following dictionary: :: {'perm': {'ugrupo': < ugrupo_id >, 'permission': < permission_id >, 'id': < id ...
Inserts a new Administrative Permission and returns its identifier. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Write. 0 or 1 :param id_group: Identifier of the Group of User. Integer value and greater ...
Change Administrative Permission from by the identifier. :param id_perm: Identifier of the Administrative Permission. Integer value and greater than zero. :param id_permission: Identifier of the Permission. Integer value and greater than zero. :param read: Read. 0 or 1 :param write: Wri...
Remove Administrative Permission from by the identifier. :param id_perms: Identifier of the Administrative Permission. Integer value and greater than zero. :return: None :raise InvalidParameterError: The identifier of Administrative Permission is null and invalid. :raise PermissaoAdmi...
Get an instance of ambiente services facade. def create_ambiente(self): """Get an instance of ambiente services facade.""" return Ambiente( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of ambiente_logico services facade. def create_ambiente_logico(self): """Get an instance of ambiente_logico services facade.""" return AmbienteLogico( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Environment Vip services facade. def create_api_environment_vip(self): """Get an instance of Api Environment Vip services facade.""" return ApiEnvironmentVip( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Environment services facade. def create_api_environment(self): """Get an instance of Api Environment services facade.""" return ApiEnvironment( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Equipment services facade. def create_api_equipment(self): """Get an instance of Api Equipment services facade.""" return ApiEquipment( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Equipment services facade. def create_api_v4_equipment(self): """Get an instance of Api Equipment services facade.""" return ApiV4Equipment( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api As services facade. def create_api_v4_as(self): """Get an instance of Api As services facade.""" return ApiV4As( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Virtual Interface services facade. def create_api_v4_virtual_interface(self): """Get an instance of Api Virtual Interface services facade.""" return ApiV4VirtualInterface( self.networkapi_url, self.user, self.password, self.user_lda...
Get an instance of Api Neighbor services facade. def create_api_v4_neighbor(self): """Get an instance of Api Neighbor services facade.""" return ApiV4Neighbor( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Vip Requests services facade. def create_api_interface_request(self): """Get an instance of Api Vip Requests services facade.""" return ApiInterfaceRequest( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api IPv4 services facade. def create_api_ipv4(self): """Get an instance of Api IPv4 services facade.""" return ApiIPv4( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api IPv6 services facade. def create_api_ipv6(self): """Get an instance of Api IPv6 services facade.""" return ApiIPv6( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api V4 IPv4 services facade. def create_api_v4_ipv4(self): """Get an instance of Api V4 IPv4 services facade.""" return ApiV4IPv4( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api V4 IPv6 services facade. def create_api_v4_ipv6(self): """Get an instance of Api V4 IPv6 services facade.""" return ApiV4IPv6( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Networkv4 services facade. def create_api_network_ipv4(self): """Get an instance of Api Networkv4 services facade.""" return ApiNetworkIPv4( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Networkv6 services facade. def create_api_network_ipv6(self): """Get an instance of Api Networkv6 services facade.""" return ApiNetworkIPv6( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Option Vip services facade. def create_api_option_vip(self): """Get an instance of Api Option Vip services facade.""" return ApiOptionVip( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Pool services facade. def create_api_pool(self): """Get an instance of Api Pool services facade.""" return ApiPool( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Pool Deploy services facade. def create_api_pool_deploy(self): """Get an instance of Api Pool Deploy services facade.""" return ApiPoolDeploy( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Rack Variables services facade. def create_apirack(self): """Get an instance of Api Rack Variables services facade.""" return ApiRack( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Vip Requests services facade. def create_api_vip_request(self): """Get an instance of Api Vip Requests services facade.""" return ApiVipRequest( self.networkapi_url, self.user, self.password, self.user_ldap, self.log_le...
Get an instance of Api Vip Requests services facade. def create_api_object_type(self): """Get an instance of Api Vip Requests services facade.""" return ApiObjectType( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Vip Requests services facade. def create_api_object_group_permission(self): """Get an instance of Api Vip Requests services facade.""" return ApiObjectGroupPermission( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api Vip Requests services facade. def create_api_object_group_permission_general(self): """Get an instance of Api Vip Requests services facade.""" return ApiObjectGroupPermissionGeneral( self.networkapi_url, self.user, self.password, s...
Get an instance of Api Vlan services facade. def create_api_vlan(self): """Get an instance of Api Vlan services facade.""" return ApiVlan( self.networkapi_url, self.user, self.password, self.user_ldap)