INSTRUCTION
stringlengths
1
8.43k
RESPONSE
stringlengths
75
104k
Setter method for throttle mapped from YANG variable/ rbridge_id/ router/ ospf/ timers/ throttle ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_throttle is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set...
def _set_throttle(self, v, load=False): """ Setter method for throttle, mapped from YANG variable /rbridge_id/router/ospf/timers/throttle (container) If this variable is read-only (config: false) in the source YANG file, then _set_throttle is considered as a private method. Backends looking to popul...
Setter method for private_vlan_trunk mapped from YANG variable/ interface/ port_channel/ switchport/ mode/ private_vlan/ private_vlan_trunk ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_private_vlan_trunk is considered as a private method. Backends looking to populate...
def _set_private_vlan_trunk(self, v, load=False): """ Setter method for private_vlan_trunk, mapped from YANG variable /interface/port_channel/switchport/mode/private_vlan/private_vlan_trunk (container) If this variable is read-only (config: false) in the source YANG file, then _set_private_vlan_trunk is...
Setter method for cngn_mon_dev mapped from YANG variable/ tm_state/ cngn_mon_dev ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_cngn_mon_dev is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_cngn_mon_de...
def _set_cngn_mon_dev(self, v, load=False): """ Setter method for cngn_mon_dev, mapped from YANG variable /tm_state/cngn_mon_dev (container) If this variable is read-only (config: false) in the source YANG file, then _set_cngn_mon_dev is considered as a private method. Backends looking to populate t...
Setter method for cngn_mon_voq mapped from YANG variable/ tm_state/ cngn_mon_voq ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_cngn_mon_voq is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_cngn_mon_vo...
def _set_cngn_mon_voq(self, v, load=False): """ Setter method for cngn_mon_voq, mapped from YANG variable /tm_state/cngn_mon_voq (container) If this variable is read-only (config: false) in the source YANG file, then _set_cngn_mon_voq is considered as a private method. Backends looking to populate t...
Setter method for cngn_mon_del_pkt mapped from YANG variable/ tm_state/ cngn_mon_del_pkt ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_cngn_mon_del_pkt is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set...
def _set_cngn_mon_del_pkt(self, v, load=False): """ Setter method for cngn_mon_del_pkt, mapped from YANG variable /tm_state/cngn_mon_del_pkt (container) If this variable is read-only (config: false) in the source YANG file, then _set_cngn_mon_del_pkt is considered as a private method. Backends looki...
Setter method for ignore_delete_all_response mapped from YANG variable/ vcenter/ discovery/ ignore_delete_all_response ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_ignore_delete_all_response is considered as a private method. Backends looking to populate this variabl...
def _set_ignore_delete_all_response(self, v, load=False): """ Setter method for ignore_delete_all_response, mapped from YANG variable /vcenter/discovery/ignore_delete_all_response (container) If this variable is read-only (config: false) in the source YANG file, then _set_ignore_delete_all_response is c...
Setter method for gw_type mapped from YANG variable/ overlay_gateway/ gw_type ( overlay - gw - type ) If this variable is read - only ( config: false ) in the source YANG file then _set_gw_type is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_gw_type (...
def _set_gw_type(self, v, load=False): """ Setter method for gw_type, mapped from YANG variable /overlay_gateway/gw_type (overlay-gw-type) If this variable is read-only (config: false) in the source YANG file, then _set_gw_type is considered as a private method. Backends looking to populate this var...
Setter method for map_ mapped from YANG variable/ overlay_gateway/ map ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_map_ is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_map_ () directly.
def _set_map_(self, v, load=False): """ Setter method for map_, mapped from YANG variable /overlay_gateway/map (container) If this variable is read-only (config: false) in the source YANG file, then _set_map_ is considered as a private method. Backends looking to populate this variable should do...
Setter method for overlay_service_policy mapped from YANG variable/ overlay_gateway/ overlay_service_policy ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_overlay_service_policy is considered as a private method. Backends looking to populate this variable should do so ...
def _set_overlay_service_policy(self, v, load=False): """ Setter method for overlay_service_policy, mapped from YANG variable /overlay_gateway/overlay_service_policy (container) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_service_policy is considered as a pri...
Setter method for nd_global mapped from YANG variable/ ipv6/ ipv6_global_cmds/ nd_global ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_nd_global is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_nd_glo...
def _set_nd_global(self, v, load=False): """ Setter method for nd_global, mapped from YANG variable /ipv6/ipv6_global_cmds/nd_global (container) If this variable is read-only (config: false) in the source YANG file, then _set_nd_global is considered as a private method. Backends looking to populate ...
Setter method for error_disable_timeout mapped from YANG variable/ protocol/ spanning_tree/ rpvst/ error_disable_timeout ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_error_disable_timeout is considered as a private method. Backends looking to populate this variable s...
def _set_error_disable_timeout(self, v, load=False): """ Setter method for error_disable_timeout, mapped from YANG variable /protocol/spanning_tree/rpvst/error_disable_timeout (container) If this variable is read-only (config: false) in the source YANG file, then _set_error_disable_timeout is considered...
Setter method for port_channel mapped from YANG variable/ protocol/ spanning_tree/ rpvst/ port_channel ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_port_channel is considered as a private method. Backends looking to populate this variable should do so via calling thi...
def _set_port_channel(self, v, load=False): """ Setter method for port_channel, mapped from YANG variable /protocol/spanning_tree/rpvst/port_channel (container) If this variable is read-only (config: false) in the source YANG file, then _set_port_channel is considered as a private method. Backends l...
Yield file contents by block then close the file.
def iter_and_close(file_like, block_size): """Yield file contents by block then close the file.""" while 1: try: block = file_like.read(block_size) if block: yield block else: raise StopIteration except StopIteration: ...
Return a Cling that serves from the given package and dir_name.
def cling_wrap(package_name, dir_name, **kw): """Return a Cling that serves from the given package and dir_name. This uses pkg_resources.resource_filename which is not the recommended way, since it extracts the files. I think this works fine unless you have some _very_ serious requirements for sta...
Guard against arbitrary file retrieval.
def _is_under_root(self, full_path): """Guard against arbitrary file retrieval.""" if (path.abspath(full_path) + path.sep)\ .startswith(path.abspath(self.root) + path.sep): return True else: return False
Return a tuple of etag last_modified by mtime from stat.
def _conditions(self, full_path, environ): """Return a tuple of etag, last_modified by mtime from stat.""" mtime = stat(full_path).st_mtime return str(mtime), rfc822.formatdate(mtime)
Return an iterator over the body of the response.
def _body(self, full_path, environ, file_like): """Return an iterator over the body of the response.""" way_to_send = environ.get('wsgi.file_wrapper', iter_and_close) return way_to_send(file_like, self.block_size)
Return the first magic that matches this path or None.
def _match_magic(self, full_path): """Return the first magic that matches this path or None.""" for magic in self.magics: if magic.matches(full_path): return magic
Return the full path from which to read.
def _full_path(self, path_info): """Return the full path from which to read.""" full_path = self.root + path_info if path.exists(full_path): return full_path else: for magic in self.magics: if path.exists(magic.new_path(full_path)): ...
Guess the mime type magically or using the mimetypes module.
def _guess_type(self, full_path): """Guess the mime type magically or using the mimetypes module.""" magic = self._match_magic(full_path) if magic is not None: return (mimetypes.guess_type(magic.old_path(full_path))[0] or 'text/plain') else: re...
Return Etag and Last - Modified values defaults to now for both.
def _conditions(self, full_path, environ): """Return Etag and Last-Modified values defaults to now for both.""" magic = self._match_magic(full_path) if magic is not None: return magic.conditions(full_path, environ) else: mtime = stat(full_path).st_mtime ...
Return the appropriate file object.
def _file_like(self, full_path): """Return the appropriate file object.""" magic = self._match_magic(full_path) if magic is not None: return magic.file_like(full_path, self.encoding) else: return open(full_path, 'rb')
Return an iterator over the body of the response.
def _body(self, full_path, environ, file_like): """Return an iterator over the body of the response.""" magic = self._match_magic(full_path) if magic is not None: return [_encode(s, self.encoding) for s in magic.body(environ, ...
Check that self. new_path ( full_path ) exists.
def exists(self, full_path): """Check that self.new_path(full_path) exists.""" if path.exists(self.new_path(full_path)): return self.new_path(full_path)
Remove self. extension from path or raise MagicError.
def old_path(self, full_path): """Remove self.extension from path or raise MagicError.""" if self.matches(full_path): return full_path[:-len(self.extension)] else: raise MagicError("Path does not match this magic.")
Return Etag and Last - Modified values ( based on mtime ).
def conditions(self, full_path, environ): """Return Etag and Last-Modified values (based on mtime).""" mtime = int(time.time()) return str(mtime), rfc822.formatdate(mtime)
Pass environ and self. variables in to template.
def body(self, environ, file_like): """Pass environ and self.variables in to template. self.variables overrides environ so that suprises in environ don't cause unexpected output if you are passing a value in explicitly. """ variables = environ.copy() variables.update(sel...
Pass environ and ** self. variables into the template.
def body(self, environ, full_path): """Pass environ and **self.variables into the template.""" template = kid.Template(file=full_path, environ=environ, **self.variables) return [template.serialize()]
Pass environ and ** self. variables into the template.
def body(self, environ, full_path): """Pass environ and **self.variables into the template.""" template = MarkupTemplate(full_path.read()) variables = self.variables.copy() variables["environ"] = environ return [template.generate(**variables) .render('html', doct...
Setter method for route_target_evpn mapped from YANG variable/ vrf/ address_family/ ipv6/ unicast/ route_target_container_ipv6/ route_target_evpn ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_route_target_evpn is considered as a private method. Backends looking to populate...
def _set_route_target_evpn(self, v, load=False): """ Setter method for route_target_evpn, mapped from YANG variable /vrf/address_family/ipv6/unicast/route_target_container_ipv6/route_target_evpn (list) If this variable is read-only (config: false) in the source YANG file, then _set_route_target_evpn is ...
Get current market rate for currency
def get_rate_for(self, currency: str, to: str, reverse: bool=False) -> Number: """Get current market rate for currency""" # Return 1 when currencies match if currency.upper() == to.upper(): return self._format_number('1.0') # Set base and quote currencies base, quot...
Convert amount to another currency
def convert(self, amount: Number, currency: str, to: str, reverse: bool=False) -> Number: """Convert amount to another currency""" rate = self.get_rate_for(currency, to, reverse) if self.return_decimal: amount = Decimal(amount) return amount * rate
Convert money to another currency
def convert_money(self, money: Money, to: str, reverse: bool=False) -> Money: """Convert money to another currency""" converted = self.convert(money.amount, money.currency, to, reverse) return Money(converted, to)
Setter method for aggregate_ipv6_address mapped from YANG variable/ rbridge_id/ router/ router_bgp/ address_family/ ipv6/ ipv6_unicast/ af_ipv6_vrf/ aggregate_ipv6_address ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_aggregate_ipv6_address is considered as a private metho...
def _set_aggregate_ipv6_address(self, v, load=False): """ Setter method for aggregate_ipv6_address, mapped from YANG variable /rbridge_id/router/router_bgp/address_family/ipv6/ipv6_unicast/af_ipv6_vrf/aggregate_ipv6_address (list) If this variable is read-only (config: false) in the source YANG file, th...
Setter method for intf_router_isis mapped from YANG variable/ routing_system/ interface/ loopback/ ip/ intf_router_isis ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_intf_router_isis is considered as a private method. Backends looking to populate this variable should ...
def _set_intf_router_isis(self, v, load=False): """ Setter method for intf_router_isis, mapped from YANG variable /routing_system/interface/loopback/ip/intf_router_isis (container) If this variable is read-only (config: false) in the source YANG file, then _set_intf_router_isis is considered as a privat...
Setter method for interface_loopback_ospf_conf mapped from YANG variable/ routing_system/ interface/ loopback/ ip/ interface_loopback_ospf_conf ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_interface_loopback_ospf_conf is considered as a private method. Backends looki...
def _set_interface_loopback_ospf_conf(self, v, load=False): """ Setter method for interface_loopback_ospf_conf, mapped from YANG variable /routing_system/interface/loopback/ip/interface_loopback_ospf_conf (container) If this variable is read-only (config: false) in the source YANG file, then _set_interf...
Setter method for pim_intf_loopback_cont mapped from YANG variable/ routing_system/ interface/ loopback/ ip/ pim_intf_loopback_cont ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_pim_intf_loopback_cont is considered as a private method. Backends looking to populate thi...
def _set_pim_intf_loopback_cont(self, v, load=False): """ Setter method for pim_intf_loopback_cont, mapped from YANG variable /routing_system/interface/loopback/ip/pim_intf_loopback_cont (container) If this variable is read-only (config: false) in the source YANG file, then _set_pim_intf_loopback_cont i...
Setter method for key mapped from YANG variable/ rbridge_id/ crypto/ key ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_key is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_key () directly.
def _set_key(self, v, load=False): """ Setter method for key, mapped from YANG variable /rbridge_id/crypto/key (list) If this variable is read-only (config: false) in the source YANG file, then _set_key is considered as a private method. Backends looking to populate this variable should do so vi...
Setter method for ca mapped from YANG variable/ rbridge_id/ crypto/ ca ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_ca is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_ca () directly.
def _set_ca(self, v, load=False): """ Setter method for ca, mapped from YANG variable /rbridge_id/crypto/ca (list) If this variable is read-only (config: false) in the source YANG file, then _set_ca is considered as a private method. Backends looking to populate this variable should do so via ca...
Setter method for red_profile_ecn mapped from YANG variable/ qos/ ecn/ red_profile/ red_profile_ecn ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_red_profile_ecn is considered as a private method. Backends looking to populate this variable should do so via calling thi...
def _set_red_profile_ecn(self, v, load=False): """ Setter method for red_profile_ecn, mapped from YANG variable /qos/ecn/red_profile/red_profile_ecn (container) If this variable is read-only (config: false) in the source YANG file, then _set_red_profile_ecn is considered as a private method. Backend...
Clear Screen
def clear(self): """ Clear Screen """ w1 = StringWidget(self, ref="_w1_", text=" "*20, x=1, y=1) w2 = StringWidget(self, ref="_w2_", text=" "*20, x=1, y=2) w3 = StringWidget(self, ref="_w3_", text=" "*20, x=1, y=3) w4 = StringWidget(self, ref="_w4_", text=" "*20...
Add Icon Widget
def add_icon_widget(self, ref, x=1, y=1, name="heart"): """ Add Icon Widget """ if ref not in self.widgets: widget = IconWidget(screen=self, ref=ref, x=x, y=y, name=name) self.widgets[ref] = widget return self.widgets[ref]
Add Scroller Widget
def add_scroller_widget(self, ref, left=1, top=1, right=20, bottom=1, direction="h", speed=1, text="Message"): """ Add Scroller Widget """ if ref not in self.widgets: widget = ScrollerWidget(screen=self, ref=ref, left=left, top=top, right=right, bottom=bottom, direc...
Setter method for mem_list mapped from YANG variable/ mem_state/ mem_list ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_mem_list is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_mem_list () directly.
def _set_mem_list(self, v, load=False): """ Setter method for mem_list, mapped from YANG variable /mem_state/mem_list (container) If this variable is read-only (config: false) in the source YANG file, then _set_mem_list is considered as a private method. Backends looking to populate this variable sh...
Setter method for alternate_as mapped from YANG variable/ rbridge_id/ router/ router_bgp/ router_bgp_attributes/ neighbor/ peer_grps/ neighbor_peer_grp/ alternate_as ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_alternate_as is considered as a private method. Backends...
def _set_alternate_as(self, v, load=False): """ Setter method for alternate_as, mapped from YANG variable /rbridge_id/router/router_bgp/router_bgp_attributes/neighbor/peer_grps/neighbor_peer_grp/alternate_as (container) If this variable is read-only (config: false) in the source YANG file, then _set_alt...
Setter method for af_neighbor_capability mapped from YANG variable/ rbridge_id/ router/ router_bgp/ router_bgp_attributes/ neighbor/ peer_grps/ neighbor_peer_grp/ af_neighbor_capability ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_af_neighbor_capability is considered...
def _set_af_neighbor_capability(self, v, load=False): """ Setter method for af_neighbor_capability, mapped from YANG variable /rbridge_id/router/router_bgp/router_bgp_attributes/neighbor/peer_grps/neighbor_peer_grp/af_neighbor_capability (container) If this variable is read-only (config: false) in the s...
Setter method for fabric_isl mapped from YANG variable/ interface/ fortygigabitethernet/ fabric/ fabric_isl ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_fabric_isl is considered as a private method. Backends looking to populate this variable should do so via calling ...
def _set_fabric_isl(self, v, load=False): """ Setter method for fabric_isl, mapped from YANG variable /interface/fortygigabitethernet/fabric/fabric_isl (container) If this variable is read-only (config: false) in the source YANG file, then _set_fabric_isl is considered as a private method. Backends ...
Setter method for fabric_trunk mapped from YANG variable/ interface/ fortygigabitethernet/ fabric/ fabric_trunk ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_fabric_trunk is considered as a private method. Backends looking to populate this variable should do so via ca...
def _set_fabric_trunk(self, v, load=False): """ Setter method for fabric_trunk, mapped from YANG variable /interface/fortygigabitethernet/fabric/fabric_trunk (container) If this variable is read-only (config: false) in the source YANG file, then _set_fabric_trunk is considered as a private method. B...
Setter method for neighbor_discovery mapped from YANG variable/ interface/ fortygigabitethernet/ fabric/ neighbor_discovery ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_neighbor_discovery is considered as a private method. Backends looking to populate this variable s...
def _set_neighbor_discovery(self, v, load=False): """ Setter method for neighbor_discovery, mapped from YANG variable /interface/fortygigabitethernet/fabric/neighbor_discovery (container) If this variable is read-only (config: false) in the source YANG file, then _set_neighbor_discovery is considered as...
Setter method for source mapped from YANG variable/ acl_mirror/ source ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_source is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_source () directly.
def _set_source(self, v, load=False): """ Setter method for source, mapped from YANG variable /acl_mirror/source (list) If this variable is read-only (config: false) in the source YANG file, then _set_source is considered as a private method. Backends looking to populate this variable should do ...
Setter method for learning_mode mapped from YANG variable/ mac_address_table/ learning_mode ( enumeration ) If this variable is read - only ( config: false ) in the source YANG file then _set_learning_mode is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _s...
def _set_learning_mode(self, v, load=False): """ Setter method for learning_mode, mapped from YANG variable /mac_address_table/learning_mode (enumeration) If this variable is read-only (config: false) in the source YANG file, then _set_learning_mode is considered as a private method. Backends lookin...
Setter method for mac_move mapped from YANG variable/ mac_address_table/ mac_move ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_mac_move is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_mac_move () di...
def _set_mac_move(self, v, load=False): """ Setter method for mac_move, mapped from YANG variable /mac_address_table/mac_move (container) If this variable is read-only (config: false) in the source YANG file, then _set_mac_move is considered as a private method. Backends looking to populate this var...
Returns application installation path.
def install_dir(self): """Returns application installation path. .. note:: If fails this falls back to a restricted interface, which can only be used by approved apps. :rtype: str """ max_len = 500 directory = self._get_str(self._iface.get_install_dir, [se...
Date and time of app purchase.
def purchase_time(self): """Date and time of app purchase. :rtype: datetime """ ts = self._iface.get_purchase_time(self.app_id) return datetime.utcfromtimestamp(ts)
Returns tuple with download progress ( for optional DLCs ):
def get_download_progress(self): """Returns tuple with download progress (for optional DLCs): (bytes_downloaded, bytes_total) :rtype: tuple """ downloaded = CRef.cint() total = CRef.cint() result = self._iface.get_dlc_download_progress(self.app_id, download...
Setter method for protocol_type mapped from YANG variable/ mpls_state/ ldp/ tunnels/ ldp_tunnels/ protocol_type ( mpls - protocol - type ) If this variable is read - only ( config: false ) in the source YANG file then _set_protocol_type is considered as a private method. Backends looking to populate this variable shoul...
def _set_protocol_type(self, v, load=False): """ Setter method for protocol_type, mapped from YANG variable /mpls_state/ldp/tunnels/ldp_tunnels/protocol_type (mpls-protocol-type) If this variable is read-only (config: false) in the source YANG file, then _set_protocol_type is considered as a private ...
Setter method for engineID mapped from YANG variable/ rbridge_id/ snmp_server/ engineID ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_engineID is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_engineID...
def _set_engineID(self, v, load=False): """ Setter method for engineID, mapped from YANG variable /rbridge_id/snmp_server/engineID (container) If this variable is read-only (config: false) in the source YANG file, then _set_engineID is considered as a private method. Backends looking to populate thi...
Setter method for offline_if mapped from YANG variable/ rbridge_id/ snmp_server/ offline_if ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_offline_if is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_of...
def _set_offline_if(self, v, load=False): """ Setter method for offline_if, mapped from YANG variable /rbridge_id/snmp_server/offline_if (container) If this variable is read-only (config: false) in the source YANG file, then _set_offline_if is considered as a private method. Backends looking to popu...
Setter method for three_tuple_if mapped from YANG variable/ rbridge_id/ snmp_server/ three_tuple_if ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_three_tuple_if is considered as a private method. Backends looking to populate this variable should do so via calling this...
def _set_three_tuple_if(self, v, load=False): """ Setter method for three_tuple_if, mapped from YANG variable /rbridge_id/snmp_server/three_tuple_if (container) If this variable is read-only (config: false) in the source YANG file, then _set_three_tuple_if is considered as a private method. Backends...
Setter method for ldp_out mapped from YANG variable/ mpls_state/ ldp/ ldp_out ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_ldp_out is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_ldp_out () directly...
def _set_ldp_out(self, v, load=False): """ Setter method for ldp_out, mapped from YANG variable /mpls_state/ldp/ldp_out (container) If this variable is read-only (config: false) in the source YANG file, then _set_ldp_out is considered as a private method. Backends looking to populate this variable s...
Setter method for port mapped from YANG variable/ qos/ cpu/ slot/ port_group/ port ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_port is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_port () directly.
def _set_port(self, v, load=False): """ Setter method for port, mapped from YANG variable /qos/cpu/slot/port_group/port (container) If this variable is read-only (config: false) in the source YANG file, then _set_port is considered as a private method. Backends looking to populate this variable shou...
Setter method for group mapped from YANG variable/ qos/ cpu/ slot/ port_group/ group ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_group is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_group () directly.
def _set_group(self, v, load=False): """ Setter method for group, mapped from YANG variable /qos/cpu/slot/port_group/group (list) If this variable is read-only (config: false) in the source YANG file, then _set_group is considered as a private method. Backends looking to populate this variable shoul...
Setter method for port_to_port_profile_domain_association mapped from YANG variable/ interface/ port_channel/ port_profile_to_interface_associations/ port_profile_port/ port_to_port_profile_domain_association ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_port_to_port_...
def _set_port_to_port_profile_domain_association(self, v, load=False): """ Setter method for port_to_port_profile_domain_association, mapped from YANG variable /interface/port_channel/port_profile_to_interface_associations/port_profile_port/port_to_port_profile_domain_association (container) If this variabl...
Setter method for port_to_port_profile_associations mapped from YANG variable/ interface/ port_channel/ port_profile_to_interface_associations/ port_profile_port/ port_to_port_profile_associations ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_port_to_port_profile_associati...
def _set_port_to_port_profile_associations(self, v, load=False): """ Setter method for port_to_port_profile_associations, mapped from YANG variable /interface/port_channel/port_profile_to_interface_associations/port_profile_port/port_to_port_profile_associations (list) If this variable is read-only (config:...
Setter method for context mapped from YANG variable/ snmp_server/ context ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_context is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_context () directly.
def _set_context(self, v, load=False): """ Setter method for context, mapped from YANG variable /snmp_server/context (list) If this variable is read-only (config: false) in the source YANG file, then _set_context is considered as a private method. Backends looking to populate this variable should ...
Setter method for community mapped from YANG variable/ snmp_server/ community ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_community is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_community () directly.
def _set_community(self, v, load=False): """ Setter method for community, mapped from YANG variable /snmp_server/community (list) If this variable is read-only (config: false) in the source YANG file, then _set_community is considered as a private method. Backends looking to populate this variable s...
Setter method for host mapped from YANG variable/ snmp_server/ host ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_host is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_host () directly.
def _set_host(self, v, load=False): """ Setter method for host, mapped from YANG variable /snmp_server/host (list) If this variable is read-only (config: false) in the source YANG file, then _set_host is considered as a private method. Backends looking to populate this variable should do so via ...
Setter method for view mapped from YANG variable/ snmp_server/ view ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_view is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_view () directly.
def _set_view(self, v, load=False): """ Setter method for view, mapped from YANG variable /snmp_server/view (list) If this variable is read-only (config: false) in the source YANG file, then _set_view is considered as a private method. Backends looking to populate this variable should do so via ...
Setter method for network mapped from YANG variable/ routing_system/ interface/ ve/ ipv6/ interface_ospfv3_conf/ network ( enumeration ) If this variable is read - only ( config: false ) in the source YANG file then _set_network is considered as a private method. Backends looking to populate this variable should do so ...
def _set_network(self, v, load=False): """ Setter method for network, mapped from YANG variable /routing_system/interface/ve/ipv6/interface_ospfv3_conf/network (enumeration) If this variable is read-only (config: false) in the source YANG file, then _set_network is considered as a private method. Ba...
Setter method for intf_type mapped from YANG variable/ logical_interface_state/ main_interface_physical/ intf_type ( intf - type ) If this variable is read - only ( config: false ) in the source YANG file then _set_intf_type is considered as a private method. Backends looking to populate this variable should do so via ...
def _set_intf_type(self, v, load=False): """ Setter method for intf_type, mapped from YANG variable /logical_interface_state/main_interface_physical/intf_type (intf-type) If this variable is read-only (config: false) in the source YANG file, then _set_intf_type is considered as a private method. Bac...
Setter method for routes mapped from YANG variable/ rbridge_id/ vrf/ address_family/ ipv6/ unicast/ ipv6/ import/ routes ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_routes is considered as a private method. Backends looking to populate this variable should do so via call...
def _set_routes(self, v, load=False): """ Setter method for routes, mapped from YANG variable /rbridge_id/vrf/address_family/ipv6/unicast/ipv6/import/routes (list) If this variable is read-only (config: false) in the source YANG file, then _set_routes is considered as a private method. Backends look...
Setter method for collector_vrf mapped from YANG variable/ sflow/ collector_vrf ( common - def: vrf - name ) If this variable is read - only ( config: false ) in the source YANG file then _set_collector_vrf is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _...
def _set_collector_vrf(self, v, load=False): """ Setter method for collector_vrf, mapped from YANG variable /sflow/collector_vrf (common-def:vrf-name) If this variable is read-only (config: false) in the source YANG file, then _set_collector_vrf is considered as a private method. Backends looking to...
Setter method for linkinfo_isllink_srcport_type mapped from YANG variable/ brocade_fabric_service_rpc/ show_linkinfo/ output/ show_link_info/ linkinfo_isl/ linkinfo_isllink_srcport_type ( interfacetype - type ) If this variable is read - only ( config: false ) in the source YANG file then _set_linkinfo_isllink_srcport_...
def _set_linkinfo_isllink_srcport_type(self, v, load=False): """ Setter method for linkinfo_isllink_srcport_type, mapped from YANG variable /brocade_fabric_service_rpc/show_linkinfo/output/show_link_info/linkinfo_isl/linkinfo_isllink_srcport_type (interfacetype-type) If this variable is read-only (config: f...
Setter method for tcp mapped from YANG variable/ interface/ management/ tcp ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_tcp is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_tcp () directly.
def _set_tcp(self, v, load=False): """ Setter method for tcp, mapped from YANG variable /interface/management/tcp (container) If this variable is read-only (config: false) in the source YANG file, then _set_tcp is considered as a private method. Backends looking to populate this variable should ...
Setter method for speed mapped from YANG variable/ interface/ management/ speed ( enumeration ) If this variable is read - only ( config: false ) in the source YANG file then _set_speed is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_speed () directly...
def _set_speed(self, v, load=False): """ Setter method for speed, mapped from YANG variable /interface/management/speed (enumeration) If this variable is read-only (config: false) in the source YANG file, then _set_speed is considered as a private method. Backends looking to populate this variable s...
Setter method for line_speed mapped from YANG variable/ interface/ management/ line_speed ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_line_speed is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_line...
def _set_line_speed(self, v, load=False): """ Setter method for line_speed, mapped from YANG variable /interface/management/line_speed (container) If this variable is read-only (config: false) in the source YANG file, then _set_line_speed is considered as a private method. Backends looking to popula...
Setter method for shutdown_management_oper mapped from YANG variable/ interface/ management/ shutdown_management_oper ( string ) If this variable is read - only ( config: false ) in the source YANG file then _set_shutdown_management_oper is considered as a private method. Backends looking to populate this variable shou...
def _set_shutdown_management_oper(self, v, load=False): """ Setter method for shutdown_management_oper, mapped from YANG variable /interface/management/shutdown_management_oper (string) If this variable is read-only (config: false) in the source YANG file, then _set_shutdown_management_oper is considere...
Setter method for global_isis_info mapped from YANG variable/ isis_state/ global_isis_info ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_global_isis_info is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _s...
def _set_global_isis_info(self, v, load=False): """ Setter method for global_isis_info, mapped from YANG variable /isis_state/global_isis_info (container) If this variable is read-only (config: false) in the source YANG file, then _set_global_isis_info is considered as a private method. Backends loo...
Setter method for router_isis_config mapped from YANG variable/ isis_state/ router_isis_config ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_router_isis_config is considered as a private method. Backends looking to populate this variable should do so via calling thisO...
def _set_router_isis_config(self, v, load=False): """ Setter method for router_isis_config, mapped from YANG variable /isis_state/router_isis_config (container) If this variable is read-only (config: false) in the source YANG file, then _set_router_isis_config is considered as a private method. Back...
Setter method for host_table mapped from YANG variable/ isis_state/ host_table ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_host_table is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_host_table () d...
def _set_host_table(self, v, load=False): """ Setter method for host_table, mapped from YANG variable /isis_state/host_table (container) If this variable is read-only (config: false) in the source YANG file, then _set_host_table is considered as a private method. Backends looking to populate this va...
Setter method for ipv4_routes mapped from YANG variable/ isis_state/ ipv4_routes ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_ipv4_routes is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_ipv4_routes ...
def _set_ipv4_routes(self, v, load=False): """ Setter method for ipv4_routes, mapped from YANG variable /isis_state/ipv4_routes (container) If this variable is read-only (config: false) in the source YANG file, then _set_ipv4_routes is considered as a private method. Backends looking to populate thi...
Setter method for ipv6_routes mapped from YANG variable/ isis_state/ ipv6_routes ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_ipv6_routes is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_ipv6_routes ...
def _set_ipv6_routes(self, v, load=False): """ Setter method for ipv6_routes, mapped from YANG variable /isis_state/ipv6_routes (container) If this variable is read-only (config: false) in the source YANG file, then _set_ipv6_routes is considered as a private method. Backends looking to populate thi...
Setter method for interface_brief mapped from YANG variable/ isis_state/ interface_brief ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_interface_brief is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_...
def _set_interface_brief(self, v, load=False): """ Setter method for interface_brief, mapped from YANG variable /isis_state/interface_brief (container) If this variable is read-only (config: false) in the source YANG file, then _set_interface_brief is considered as a private method. Backends looking...
Setter method for interface_detail mapped from YANG variable/ isis_state/ interface_detail ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_interface_detail is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _s...
def _set_interface_detail(self, v, load=False): """ Setter method for interface_detail, mapped from YANG variable /isis_state/interface_detail (container) If this variable is read-only (config: false) in the source YANG file, then _set_interface_detail is considered as a private method. Backends loo...
Invokes the pipeline with the defined command. Command line arguments and the command need to be set with arg_builder and command_builder respectively before this method can be invoked.
def run(self, args, pipeline_command): """ Invokes the pipeline with the defined command. Command line arguments, and the command need to be set with arg_builder, and command_builder respectively before this method can be invoked. """ # output that must be moved but not ...
Use this context manager to add arguments to an argparse object with the add_argument method. Arguments must be defined before the command is defined. Note that no - clean and resume are added upon exit and should not be added in the context manager. For more info about these default arguments see below.
def get_args(self): """ Use this context manager to add arguments to an argparse object with the add_argument method. Arguments must be defined before the command is defined. Note that no-clean and resume are added upon exit and should not be added in the context manager. For mor...
Setter method for cos_threshold mapped from YANG variable/ interface/ gigabitethernet/ qos/ rcv_queue/ cos_threshold ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_cos_threshold is considered as a private method. Backends looking to populate this variable should do so ...
def _set_cos_threshold(self, v, load=False): """ Setter method for cos_threshold, mapped from YANG variable /interface/gigabitethernet/qos/rcv_queue/cos_threshold (container) If this variable is read-only (config: false) in the source YANG file, then _set_cos_threshold is considered as a private met...
A wrapper for boost_ranks.
def wrap_rankboost(job, rsem_files, merged_mhc_calls, transgene_out, univ_options, rankboost_options): """ A wrapper for boost_ranks. :param dict rsem_files: Dict of results from rsem :param dict merged_mhc_calls: Dict of results from merging mhc peptide binding predictions :para...
Boost the ranks of the predicted peptides: MHC combinations.
def boost_ranks(job, isoform_expression, merged_mhc_calls, transgene_out, univ_options, rankboost_options): """ Boost the ranks of the predicted peptides:MHC combinations. :param toil.fileStore.FileID isoform_expression: fsID of rsem isoform expression file :param dict merged_mhc_calls:...
Setter method for vcs_cluster_type_info mapped from YANG variable/ brocade_vcs_rpc/ show_vcs/ output/ vcs_cluster_type_info ( vcs - cluster - type ) If this variable is read - only ( config: false ) in the source YANG file then _set_vcs_cluster_type_info is considered as a private method. Backends looking to populate t...
def _set_vcs_cluster_type_info(self, v, load=False): """ Setter method for vcs_cluster_type_info, mapped from YANG variable /brocade_vcs_rpc/show_vcs/output/vcs_cluster_type_info (vcs-cluster-type) If this variable is read-only (config: false) in the source YANG file, then _set_vcs_cluster_type_info is ...
Setter method for adjustment_threshold mapped from YANG variable/ mpls_config/ router/ mpls/ mpls_cmds_holder/ autobw_template/ adjustment_threshold ( container ) If this variable is read - only ( config: false ) in the source YANG file then _set_adjustment_threshold is considered as a private method. Backends looking ...
def _set_adjustment_threshold(self, v, load=False): """ Setter method for adjustment_threshold, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/autobw_template/adjustment_threshold (container) If this variable is read-only (config: false) in the source YANG file, then _set_adjustment...
Setter method for vrf mapped from YANG variable/ nas/ server_ip/ vrf ( list ) If this variable is read - only ( config: false ) in the source YANG file then _set_vrf is considered as a private method. Backends looking to populate this variable should do so via calling thisObj. _set_vrf () directly.
def _set_vrf(self, v, load=False): """ Setter method for vrf, mapped from YANG variable /nas/server_ip/vrf (list) If this variable is read-only (config: false) in the source YANG file, then _set_vrf is considered as a private method. Backends looking to populate this variable should do so via ca...
Attempt to determine bot s filesystem path from its module.
def _path_from_module(module): """Attempt to determine bot's filesystem path from its module.""" # Convert paths to list because Python's _NamespacePath doesn't support # indexing. paths = list(getattr(module, '__path__', [])) if len(paths) != 1: filename = getattr(mo...
Factory that creates an bot config from an entry in INSTALLED_APPS.
def create(cls, entry): """ Factory that creates an bot config from an entry in INSTALLED_APPS. """ # trading_bots.example.bot.ExampleBot try: # If import_module succeeds, entry is a path to a bot module, # which may specify a bot class with a default_bot ...
Return the config with the given case - insensitive config_name. Raise LookupError if no config exists with this name.
def get_config(self, config_name, require_ready=True): """ Return the config with the given case-insensitive config_name. Raise LookupError if no config exists with this name. """ if require_ready: self.bots.check_configs_ready() else: self.bots.ch...
Return an iterable of models.
def get_configs(self): """ Return an iterable of models. """ self.bots.check_models_ready() for config in self.configs.values(): yield config
Load bots. Import each bot module. It is thread - safe and idempotent but not re - entrant.
def populate(self, installed_bots=None): """ Load bots. Import each bot module. It is thread-safe and idempotent, but not re-entrant. """ if self.ready: return # populate() might be called by two threads in parallel on servers # that create th...
Import all bots and returns a bot class for the given label. Raise LookupError if no bot exists with this label.
def get_bot(self, bot_label): """ Import all bots and returns a bot class for the given label. Raise LookupError if no bot exists with this label. """ self.check_bots_ready() try: return self.bots[bot_label] except KeyError: message = "No i...
Return a list of all installed configs.
def get_configs(self): """ Return a list of all installed configs. """ self.check_configs_ready() result = [] for bot in self.bots.values(): result.extend(list(bot.get_models())) return result
Return the config matching the given bot_label and config_name. config_name is case - insensitive. Raise LookupError if no bot exists with this label or no config exists with this name in the bot. Raise ValueError if called with a single argument that doesn t contain exactly one dot.
def get_config(self, bot_label, config_name=None, require_ready=True): """ Return the config matching the given bot_label and config_name. config_name is case-insensitive. Raise LookupError if no bot exists with this label, or no config exists with this name in the bot. Raise Val...