text
stringlengths
81
112k
Get an instance of Api Vrf services facade. def create_api_vrf(self): """Get an instance of Api Vrf services facade.""" return ApiVrf( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of block rule services facade. def create_rule(self): """Get an instance of block rule services facade.""" return BlockRule( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of direito_grupo_equipamento services facade. def create_direito_grupo_equipamento(self): """Get an instance of direito_grupo_equipamento services facade.""" return DireitoGrupoEquipamento( self.networkapi_url, self.user, self.password, se...
Get an instance of divisao_dc services facade. def create_divisao_dc(self): """Get an instance of divisao_dc services facade.""" return DivisaoDc( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of environment_vip services facade. def create_environment_vip(self): """Get an instance of environment_vip services facade.""" return EnvironmentVIP( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of equipamento services facade. def create_equipamento(self): """Get an instance of equipamento services facade.""" return Equipamento( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of equipamento_acesso services facade. def create_equipamento_acesso(self): """Get an instance of equipamento_acesso services facade.""" return EquipamentoAcesso( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of equipamento_ambiente services facade. def create_equipamento_ambiente(self): """Get an instance of equipamento_ambiente services facade.""" return EquipamentoAmbiente( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of equipamento_roteiro services facade. def create_equipamento_roteiro(self): """Get an instance of equipamento_roteiro services facade.""" return EquipamentoRoteiro( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of log services facade. def create_log(self): """Get an instance of log services facade.""" return EventLog( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of filter services facade. def create_filter(self): """Get an instance of filter services facade.""" return Filter( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of grupo_equipamento services facade. def create_grupo_equipamento(self): """Get an instance of grupo_equipamento services facade.""" return GrupoEquipamento( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of grupo_l3 services facade. def create_grupo_l3(self): """Get an instance of grupo_l3 services facade.""" return GrupoL3( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of grupo_usuario services facade. def create_grupo_usuario(self): """Get an instance of grupo_usuario services facade.""" return GrupoUsuario( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of grupo_virtual services facade. def create_grupo_virtual(self): """Get an instance of grupo_virtual services facade.""" return GrupoVirtual( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Poll services facade. def create_healthcheck(self): """Get an instance of Poll services facade.""" return Healthcheck( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of interface services facade. def create_interface(self): """Get an instance of interface services facade.""" return Interface( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of ip services facade. def create_ip(self): """Get an instance of ip services facade.""" return Ip( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of marca services facade. def create_marca(self): """Get an instance of marca services facade.""" return Marca( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of modelo services facade. def create_modelo(self): """Get an instance of modelo services facade.""" return Modelo( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of DHCPRelayIPv4 services facade. def create_dhcprelay_ipv4(self): """Get an instance of DHCPRelayIPv4 services facade.""" return DHCPRelayIPv4( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of DHCPRelayIPv6 services facade. def create_dhcprelay_ipv6(self): """Get an instance of DHCPRelayIPv6 services facade.""" return DHCPRelayIPv6( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of vlan services facade. def create_network(self): """Get an instance of vlan services facade.""" return Network( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of option_pool services facade. def create_option_pool(self): """Get an instance of option_pool services facade.""" return OptionPool( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of option_vip services facade. def create_option_vip(self): """Get an instance of option_vip services facade.""" return OptionVIP( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of permissao_administrativa services facade. def create_permissao_administrativa(self): """Get an instance of permissao_administrativa services facade.""" return PermissaoAdministrativa( self.networkapi_url, self.user, self.password, self....
Get an instance of permission services facade. def create_permission(self): """Get an instance of permission services facade.""" return Permission( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Poll services facade. def create_pool(self): """Get an instance of Poll services facade.""" return Pool( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of rack services facade. def create_rack(self): """Get an instance of rack services facade.""" return Rack( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of rackservers services facade. def create_rackservers(self): """Get an instance of rackservers services facade.""" return RackServers( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of roteiro services facade. def create_roteiro(self): """Get an instance of roteiro services facade.""" return Roteiro( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of Api System Variables services facade. def create_system(self): """Get an instance of Api System Variables services facade.""" return System( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of tipo_acesso services facade. def create_tipo_acesso(self): """Get an instance of tipo_acesso services facade.""" return TipoAcesso( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of tipo_equipamento services facade. def create_tipo_equipamento(self): """Get an instance of tipo_equipamento services facade.""" return TipoEquipamento( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of tipo_rede services facade. def create_tipo_rede(self): """Get an instance of tipo_rede services facade.""" return TipoRede( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of tipo_roteiro services facade. def create_tipo_roteiro(self): """Get an instance of tipo_roteiro services facade.""" return TipoRoteiro( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of usuario services facade. def create_usuario(self): """Get an instance of usuario services facade.""" return Usuario( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of usuario_grupo services facade. def create_usuario_grupo(self): """Get an instance of usuario_grupo services facade.""" return UsuarioGrupo( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of vip services facade. def create_vip(self): """Get an instance of vip services facade.""" return Vip( self.networkapi_url, self.user, self.password, self.user_ldap)
Get an instance of vlan services facade. def create_vlan(self): """Get an instance of vlan services facade.""" return Vlan( self.networkapi_url, self.user, self.password, self.user_ldap)
Deploy network in equipments and set column 'active = 1' in tables redeipv6 ] :param id_networkv6: ID for NetworkIPv6 :return: Equipments configuration output def deploy(self, id_networkv6): """Deploy network in equipments and set column 'active = 1' in tables redeipv6 ] :param id_ne...
Get IPv6 network :param id_networkv4: ID for NetworkIPv6 :return: IPv6 Network def get_by_id(self, id_networkv6): """Get IPv6 network :param id_networkv4: ID for NetworkIPv6 :return: IPv6 Network """ uri = 'api/networkv4/%s/' % id_networkv6 return su...
List networks redeipv6 ] :param environment_vip: environment vip to filter :return: IPv6 Networks def list(self, environment_vip=None): """List networks redeipv6 ] :param environment_vip: environment vip to filter :return: IPv6 Networks """ uri = 'api/networ...
Remove deployment of network in equipments and set column 'active = 0' in tables redeipv6 ] :param id_networkv6: ID for NetworkIPv6 :return: Equipments configuration output def undeploy(self, id_networkv6): """Remove deployment of network in equipments and set column 'active = 0' in tables re...
Check available ipv6 in environment vip def check_vip_ip(self, ip, environment_vip): """ Check available ipv6 in environment vip """ uri = 'api/ipv6/ip/%s/environment-vip/%s/' % (ip, environment_vip) return super(ApiNetworkIPv6, self).get(uri)
Delete ipv6 def delete_ipv6(self, ipv6_id): """ Delete ipv6 """ uri = 'api/ipv6/%s/' % (ipv6_id) return super(ApiNetworkIPv6, self).delete(uri)
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...
Method to delete network-ipv6's by their ids :param ids: Identifiers of network-ipv6's :return: None def delete(self, ids): """ Method to delete network-ipv6's by their ids :param ids: Identifiers of network-ipv6's :return: None """ url = build_uri_with...
Method to update network-ipv6's :param networkipv6s: List containing network-ipv6's desired to updated :return: None def update(self, networkipv6s): """ Method to update network-ipv6's :param networkipv6s: List containing network-ipv6's desired to updated :return: None...
Method to create network-ipv6's :param networkipv6s: List containing networkipv6's desired to be created on database :return: None def create(self, networkipv6s): """ Method to create network-ipv6's :param networkipv6s: List containing networkipv6's desired to be created on da...
List all environment vips :return: Following dictionary: :: {'environment_vip': [{'id': <id>, 'finalidade_txt': <finalidade_txt>, 'cliente_txt': <cliente_txt>, 'ambiente_p44_txt': <ambiente_p44_txt> } {... other environments vip ...}]} :raise D...
List all environment vips availables :return: Following dictionary: :: {'environment_vip': [{'id': <id>, 'finalidade_txt': <finalidade_txt>, 'cliente_txt': <cliente_txt>, 'ambiente_p44_txt': <ambiente_p44_txt> } {... other environments vip ....
Inserts a new Environment VIP and returns its identifier. :param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param cliente_txt: ID Client. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param ambiente_p44_txt: Environment P44. Stri...
Change Environment VIP from by the identifier. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero. :param finalidade_txt: Finality. String with a maximum of 50 characters and respect [a-zA-Z\_-] :param cliente_txt: ID Client. String with a maximum...
Remove Environment VIP from by the identifier. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero. :return: None :raise InvalidParameterError: Environment VIP identifier is null and invalid. :raise EnvironmentVipNotFoundError: Environment...
Search Environment VIP from by parameters. Case the id parameter has been passed, the same it has priority over the other parameters. :param id_environment_vip: Identifier of the Environment VIP. Integer value and greater than zero. :param finalidade_txt: Finality. String with a maximum of 50 ...
Search finalidade_txt environment vip :return: Dictionary with the following structure: :: {‘finalidade’: ‘finalidade’: <'finalidade_txt'>} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to generate the XML response. de...
Search cliente_txt environment vip :return: Dictionary with the following structure: :: {‘cliente_txt’: ‘finalidade’: <'finalidade_txt'>, 'cliente_txt: <'cliente_txt'>'} :raise InvalidParameterError: finalidade_txt is null and invalid. :raise DataB...
Search ambiente_p44_txt environment vip :return: Dictionary with the following structure: :: {‘ambiente_p44_txt’: 'id':<'id_ambientevip'>, ‘finalidade’: <'finalidade_txt'>, 'cliente_txt: <'cliente_txt'>', 'ambiente_p44: <'ambiente_p44'>',} ...
List finality, client or environment vip list. Param finality: finality of environment(optional) Param client: client of environment(optional) Param environmentp44: environmentp44(optional) Return finality list: when request has no finality and client. Return client list: when re...
Method to search environments vip based on extends search. :param search: Dict containing QuerySets to find environments vip. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :param fields: Array containing f...
Method to get environments vip by their ids :param ids: List containing identifiers of environments vip :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 defa...
Method to delete environments vip by their id's. :param ids: Identifiers of environments vip :return: None def delete(self, ids): """ Method to delete environments vip by their id's. :param ids: Identifiers of environments vip :return: None """ url = bu...
Method to update environments vip :param environments vip: List containing environments vip desired to updated :return: None def update(self, environments): """ Method to update environments vip :param environments vip: List containing environm...
Method to create environments vip :param environments vip: Dict containing environments vip desired to be created on database :return: None def create(self, environments): """ Method to create environments vip :param environments vip: Dict cont...
Get IPv4 by id. :param id_ip: ID of IPv4. :return: Dictionary with the following structure: :: {'ip': {'id': < id >, 'networkipv4': < networkipv4 >, 'oct4': < oct4 >, 'oct3': < oct3 >, 'oct2': < oct2 >, 'oct1': < oct1 >,...
Get IPv6 by id. :param id_ip: ID of IPv6. :return: Dictionary with the following structure: :: {'ip': {'id': < id >, 'networkipv6': < networkipv6 >, 'block1': < block1 >, 'block2': < block2 >, 'block3': < block3 >, 'bloc...
Get IP with an associated environment. :param ip: IP address in the format x1.x2.x3.x4. :param id_environment: Identifier of the environment. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ip': {'id': < id >, 'id_vl...
Get a available IP in the network ipv4 :param id_network: Network identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ip': {'ip': < available_ip >}} :raise IpNotAvailableError: Network dont have available IP for insert ...
Get a available IP in the Equipment related Environment VIP :param equip_name: Equipment Name. :param id_evip: Vip environment identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: { 'ipv4': [ {'id': < id >, 'ip': < ip >, 'n...
Get a Ipv4 or Ipv6 by IP :param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx' :return: Dictionary with the following structure: :: {'ips': [{'oct4': < oct4 >, 'oct2': < oct2 >, 'oct3': < oct3 >, 'oct1': < oct1 >, 'version': < version >...
Get a Ipv4 or Ipv6 for Vip request :param ip: IPv4 or Ipv6. 'xxx.xxx.xxx.xxx or xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx' :return: Dictionary with the following structure: :: {'ip': {'ip': < ip - octs for ipv4, blocks for ipv6 - >, 'id': <id>, 'network4 or ...
Get a available IP in Network ipv6 :param id_network6: Network ipv6 identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ip6': {'ip6': < available_ip6 >}} :raise IpNotAvailableError: Network dont have available IP. ...
Get and save a available IP in the network ipv6 for vip request :param id_evip: Vip environment identifier. Integer value and greater than zero. :param name: Ip description :return: Dictionary with the following structure: :: {'ip': {'bloco1':<bloco1>, 'bloco2...
Edit a IP4 :param ip4: An IP4 available to save in format x.x.x.x. :param id_ip: IP identifier. Integer value and greater than zero. :param descricao: IP description. :return: None def edit_ipv4(self, ip4, descricao, id_ip): """ Edit a IP4 :param ip4: An IP4 a...
Save a IP4 and associate with equipment :param ip4: An IP4 available to save in format x.x.x.x. :param id_equip: Equipment identifier. Integer value and greater than zero. :param descricao: IP description. :param id_net: Network identifier. Integer value and greater than zero. ...
Edit a IP6 :param ip6: An IP6 available to save in format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx. :param descricao: IP description. :param id_ip: Ipv6 identifier. Integer value and greater than zero. :return: None def edit_ipv6(self, ip6, descricao, id_ip): """ Edit a...
Get an IP by ID :param id_ip: IP identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: { ips { id: <id_ip4>, oct1: <oct1>, oct2: <oct2>, oct3: <oct3>, oct4: <oct4>, equipam...
Get Ips related to equipment by its identifier :param id_equip: Equipment identifier. Integer value and greater than zero. :return: Dictionary with the following structure: { ips: { ipv4:[ id: <id_ip4>, oct1: <oct1>, oct2: <oct2>, oct3: <oct...
Get an IP6 by ID :param id_ip: IP6 identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ip': {'id': < id >, 'block1': <block1>, 'block2': <block2>, 'block3': <block3>, 'block4': <bl...
Save an IP6 and associate with equipment :param ip6: An IP6 available to save in format xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx. :param id_equip: Equipment identifier. Integer value and greater than zero. :param descricao: IPv6 description. :param id_net: Network identifier. Integer val...
Delete an IP4 :param id_ip: Ipv4 identifier. Integer value and greater than zero. :return: None :raise IpNotFoundError: IP is not registered. :raise DataBaseError: Networkapi failed to access the database. def delete_ip4(self, id_ip): """ Delete an IP4 :param...
List IPv6 from network. :param id_network: Network ipv6 identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ip': {'id': < id >, 'id_vlan': < id_vlan >, 'block1': <block1>, 'block2': <block2>, ...
Get IPv6 with an associated environment. :param ipv6: IPv6 address in the format x1:x2:x3:x4:x5:x6:x7:x8. :param id_environment: Environment identifier. Integer value and greater than zero. :return: Dictionary with the following structure: :: {'ipv6': {'id': < id >, ...
Associate an IP4 with equipment. :param id_ip: IPv4 identifier. :param id_equip: Equipment identifier. Integer value and greater than zero. :param id_net: Network identifier. Integer value and greater than zero. :return: None :raise InvalidParameterError: IPv4, Equipment or Ne...
Associate an IP6 with equipment. :param id_ip: IPv6 identifier. :param id_equip: Equipment identifier. Integer value and greater than zero. :param id_net: Network identifier. Integer value and greater than zero. :return: None :raise InvalidParameterError: IPv6, Equipment or Ne...
List all network types. :return: Following dictionary: :: {'net_type': [{'id': < id_tipo_rede >, 'name': < nome_tipo_rede >}, ... other network types ...]} :raise DataBaseError: Networkapi failed to access the database. :raise XMLError: Networkapi failed to ge...
Insert new network type and return its identifier. :param name: Network type name. :return: Following dictionary: {'net_type': {'id': < id >}} :raise InvalidParameterError: Network type is none or invalid. :raise NomeTipoRedeDuplicadoError: A network type with this name already exists...
Edit network type by its identifier. :param id_net_type: Network type identifier. :param name: Network type name. :return: None :raise InvalidParameterError: Network type identifier and/or name is(are) none or invalid. :raise TipoRedeNaoExisteError: Network type does not exist...
Remove network type by its identifier. :param id_net_type: Network type identifier. :return: None :raise TipoRedeNaoExisteError: Network type does not exist. :raise TipoRedeError: Network type is associated with network. :raise InvalidParameterError: Network type is none or in...
rbnf source code compiler. def cc(filename: 'input source file', output: 'output file name. default to be replacing input file\'s suffix with ".py"' = None, name: 'name of language' = 'unname'): """ rbnf source code compiler. """ lang = Language(name) with Path(filename).open...
You can apply immediate tests on your parser. P.S: use `--opt` option takes longer starting time. def run(filename: 'python file generated by `rbnf` command, or rbnf sour file', opt: 'optimize switch' = False): """ You can apply immediate tests on your parser. P.S: use `--opt` option takes long...
Read loudly for documentation. def rbnf_lexing(text: str): """Read loudly for documentation.""" cast_map: const = _cast_map lexer_table: const = _lexer_table keyword: const = _keyword drop_table: const = _DropTable end: const = _END unknown: const = _UNKNOWN text_l...
from a series of tokenizers to code string. (preserve the indentation) def recover_codes(tokens: Iterator[Tokenizer]) -> str: """ from a series of tokenizers to code string. (preserve the indentation) """ tokens = iter(tokens) s = [] try: head = next(tokens) except StopIteration...
generate token strings' cache def str_lexer(mode): """ generate token strings' cache """ cast_to_const = ConstStrPool.cast_to_const def f_raw(inp_str, pos): return cast_to_const(mode) if inp_str.startswith(mode, pos) else None def f_collection(inp_str, pos): for each in mode: ...
generate token names' cache def regex_lexer(regex_pat): """ generate token names' cache """ if isinstance(regex_pat, str): regex_pat = re.compile(regex_pat) def f(inp_str, pos): m = regex_pat.match(inp_str, pos) return m.group() if m else None elif hasattr(...
Dispatcher function, dispatching tree type T to method _T. def dispatch(self, tree): "Dispatcher function, dispatching tree type T to method _T." if isinstance(tree, list): for t in tree: self.dispatch(t) return meth = getattr(self, "_" + tree.__class__._...
process automatic context variable capturing. return the transformed function and its ast. def process(fn, bound_names): """ process automatic context variable capturing. return the transformed function and its ast. """ if isinstance(fn, _AutoContext): fn = fn.fn # noinspection PyA...
ignore a set of tokens with specific names def ignore(self, *ignore_lst: str): """ ignore a set of tokens with specific names """ def stream(): for each in ignore_lst: each = ConstStrPool.cast_to_const(each) yield id(each), each self...
lang: language object represents your language. def build_language(source_code: str, lang: Language, filename: str): """ lang: language object represents your language. """ state = MetaState(rbnf.implementation, requires=_Wild(), filename=filename) state.data = lang _build_language(so...