INSTRUCTION
stringlengths
1
46.3k
RESPONSE
stringlengths
75
80.2k
delete a single file
def delete_file(f, ignore_errors=False): """ delete a single file """ try: os.remove(f) except Exception as ex: if ignore_errors: return print('ERROR deleting file ' + str(ex))
Processing a shell entry.
def process_shell(self, creator, entry, config): """Processing a shell entry.""" self.logger.info("Processing Bash code: start") output = [] shell = creator(entry, config) for line in shell.process(): output.append(line) self.logger.info(" | %s", line) ...
Estimate the `urbext2000` parameter for a given year assuming a nation-wide urbanisation curve. Methodology source: eqn 5.5, report FD1919/TR :param year: Year to provide estimate for :type year: float :return: Urban extent parameter :rtype: float
def urbext(self, year): """ Estimate the `urbext2000` parameter for a given year assuming a nation-wide urbanisation curve. Methodology source: eqn 5.5, report FD1919/TR :param year: Year to provide estimate for :type year: float :return: Urban extent parameter ...
reads the zip file, determines compression and unzips recursively until source files are extracted
def extract_all(zipfile, dest_folder): """ reads the zip file, determines compression and unzips recursively until source files are extracted """ z = ZipFile(zipfile) print(z) z.extract(dest_folder)
Returns the distance between the centroids of two catchments in kilometers. :param other_catchment: Catchment to calculate distance to :type other_catchment: :class:`.Catchment` :return: Distance between the catchments in km. :rtype: float
def distance_to(self, other_catchment): """ Returns the distance between the centroids of two catchments in kilometers. :param other_catchment: Catchment to calculate distance to :type other_catchment: :class:`.Catchment` :return: Distance between the catchments in km. :...
Return a list of continuous data periods by removing the data gaps from the overall record.
def continuous_periods(self): """ Return a list of continuous data periods by removing the data gaps from the overall record. """ result = [] # For the first period start_date = self.start_date for gap in self.pot_data_gaps: end_date = gap.start_date ...
Saving output for configured variable name. Args: shell_entry(dict): shell based configuration (shell, docker container or Python). output: list of strings representing output of last shell
def __handle_variable(self, shell_entry, output): """ Saving output for configured variable name. Args: shell_entry(dict): shell based configuration (shell, docker container or Python). output: list of strings representing output of last shell """ if 'var...
copy single file
def copy_file(src, dest): """ copy single file """ try: shutil.copy2(src , dest) except Exception as ex: print('ERROR copying file' + str(ex))
display sample data from a graph
def show_graph_summary(g): """ display sample data from a graph """ sample_data = [] print("list(g[RDFS.Class]) = " + str(len(list(g[RDFS.Class])))) # Get Subject Lists num_subj = 0 for subj in g.subjects(RDF.type): num_subj += 1 if num_subj < 5: sample_data.append("s...
Creates the environment Code in Base class = self.log.record_process('enviroment.py', 'Creating environment - ' + self.name)
def create(self, num_sites): """ Creates the environment Code in Base class = self.log.record_process('enviroment.py', 'Creating environment - ' + self.name) """ super(Internet, self).create(num_sites) #print('building websites') for _ in range(0,num_sites): ...
add a file to the archive
def create_zip_from_file(zip_file, fname): """ add a file to the archive """ with zipfile.ZipFile(zip_file, 'w') as myzip: myzip.write(fname)
add all the files from the folder fldr to the archive
def create_zip_from_folder(zip_file, fldr, mode="r"): """ add all the files from the folder fldr to the archive """ #print('zip from folder - adding folder : ', fldr) zipf = zipfile.ZipFile(zip_file, 'w') for root, dirs, files in os.walk(fldr): for file in files: fullname...
unzip the file contents to the dest_folder (create if it doesn't exist) and then return the list of files extracted
def extract(self, dest_fldr, password=''): """ unzip the file contents to the dest_folder (create if it doesn't exist) and then return the list of files extracted """ #print('extracting to ' + dest_fldr) if self.type == 'ZIP': self._extract_zip(dest_fl...
scans a directory for files like *.GZ or *.ZIP and returns the filename of the first one found (should only be one of each file here
def get_file_named(self, fldr, xtn): """ scans a directory for files like *.GZ or *.ZIP and returns the filename of the first one found (should only be one of each file here """ res = [] # list of Sample objects for root, _, files in os.walk(fldr): ...
Acquire the :attr:`lock` Args: blocking (bool): See :meth:`threading.Lock.acquire` timeout (float): See :meth:`threading.Lock.acquire` Returns: bool: :obj:`True` if the lock was acquired, otherwise :obj:`False`
def acquire(self, blocking=True, timeout=-1): """Acquire the :attr:`lock` Args: blocking (bool): See :meth:`threading.Lock.acquire` timeout (float): See :meth:`threading.Lock.acquire` Returns: bool: :obj:`True` if the lock was acquired, otherwise :obj:`False...
Acquire the :attr:`lock` asynchronously
async def acquire_async(self): """Acquire the :attr:`lock` asynchronously """ r = self.acquire(blocking=False) while not r: await asyncio.sleep(.01) r = self.acquire(blocking=False)
Called on event emission and notifies the :meth:`wait` method Called by :class:`AioEventWaiters` when the :class:`~pydispatch.dispatch.Event` instance is dispatched. Positional and keyword arguments are stored as instance attributes for use in the :meth:`wait` method and :attr:`aio_eve...
def trigger(self, *args, **kwargs): """Called on event emission and notifies the :meth:`wait` method Called by :class:`AioEventWaiters` when the :class:`~pydispatch.dispatch.Event` instance is dispatched. Positional and keyword arguments are stored as instance attributes for us...
Add a :class:`AioEventWaiter` to the :attr:`waiters` container The event loop to use for :attr:`AioEventWaiter.loop` is found in the current context using :func:`asyncio.get_event_loop` Returns: waiter: The created :class:`AioEventWaiter` instance
async def add_waiter(self): """Add a :class:`AioEventWaiter` to the :attr:`waiters` container The event loop to use for :attr:`AioEventWaiter.loop` is found in the current context using :func:`asyncio.get_event_loop` Returns: waiter: The created :class:`AioEventWaiter` inst...
Add a coroutine function Args: loop: The :class:`event loop <asyncio.BaseEventLoop>` instance on which to schedule callbacks callback: The :term:`coroutine function` to add
def add_method(self, loop, callback): """Add a coroutine function Args: loop: The :class:`event loop <asyncio.BaseEventLoop>` instance on which to schedule callbacks callback: The :term:`coroutine function` to add """ f, obj = get_method_vars(call...
Iterate over stored coroutine functions Yields: Stored :term:`coroutine function` objects .. seealso:: :meth:`pydispatch.utils.WeakMethodContainer.iter_instances`
def iter_methods(self): """Iterate over stored coroutine functions Yields: Stored :term:`coroutine function` objects .. seealso:: :meth:`pydispatch.utils.WeakMethodContainer.iter_instances` """ for wrkey, obj in self.iter_instances(): f, obj_id = wrkey ...
Schedule and await a coroutine on the specified loop The coroutine is wrapped and scheduled using :func:`asyncio.run_coroutine_threadsafe`. While the coroutine is "awaited", the result is not available as method returns immediately. Args: coro: The :term:`coroutine` to sche...
def submit_coroutine(self, coro, loop): """Schedule and await a coroutine on the specified loop The coroutine is wrapped and scheduled using :func:`asyncio.run_coroutine_threadsafe`. While the coroutine is "awaited", the result is not available as method returns immediately. Ar...
launch a file - used for starting html pages
def launch(self): """ launch a file - used for starting html pages """ #os.system(self.fullname) # gives permission denied seeing it needs to be chmod +x import subprocess try: retcode = subprocess.call(self.fullname, shell=True) if retcode < 0: pr...
delete a file, don't really care if it doesn't exist
def delete(self): """ delete a file, don't really care if it doesn't exist """ if self.fullname != "": try: os.remove(self.fullname) except IOError: print("Cant delete ",self.fullname)
you wont believe what this method does
def count_lines_in_file(self, fname=''): """ you wont believe what this method does """ i = 0 if fname == '': fname = self.fullname try: #with open(fname, encoding="utf8") as f: with codecs.open(fname, "r",encoding='utf8', errors='ignore') as f: ...
counts non blank lines
def count_lines_of_code(self, fname=''): """ counts non blank lines """ if fname == '': fname = self.fullname loc = 0 try: with open(fname) as f: for l in f: if l.strip() != '': loc += 1 r...
retrieve a sample of the file
def get_file_sample(self, numLines=10): """ retrieve a sample of the file """ res = '' try: with open(self.fullname, 'r') as f: for line_num, line in enumerate(f): res += str(line_num).zfill(5) + ' ' + line if line_num >= numLi...
adds a line of text to a file
def append_text(self, txt): """ adds a line of text to a file """ with open(self.fullname, "a") as myfile: myfile.write(txt)
load a file to a string
def load_file_to_string(self): """ load a file to a string """ try: with open(self.fullname, 'r') as f: txt = f.read() return txt except IOError: return ''
load a file to a list
def load_file_to_list(self): """ load a file to a list """ lst = [] try: with open(self.fullname, 'r') as f: for line in f: lst.append(line) return lst except IOError: return lst
get a HTML formatted view of all Python programs in all subfolders of AIKIF, including imports and lists of functions and classes
def get_program_list(): """ get a HTML formatted view of all Python programs in all subfolders of AIKIF, including imports and lists of functions and classes """ colList = ['FileName','FileSize','Functions', 'Imports'] txt = '<TABLE width=90% border=0>' txt += format_file_table_header(c...
extracts a displayable subfolder name from full filename
def get_subfolder(txt): """ extracts a displayable subfolder name from full filename """ root_folder = os.sep + 'aikif' + os.sep ndx = txt.find(root_folder, 1) return txt[ndx:].replace('__init__.py', '')
used to strip any poorly documented comments at the end of function defs
def strip_text_after_string(txt, junk): """ used to strip any poorly documented comments at the end of function defs """ if junk in txt: return txt[:txt.find(junk)] else: return txt
get a list of functions from a Python program
def get_functions(fname): """ get a list of functions from a Python program """ txt = '' with open(fname, 'r') as f: for line in f: if line.strip()[0:4] == 'def ': txt += '<PRE>' + strip_text_after_string(strip_text_after_string(line, '#')[4:], ':') + '</PRE>\n' ...
get a list of imports from a Python program
def get_imports(fname): """ get a list of imports from a Python program """ txt = '' with open(fname, 'r') as f: for line in f: if line[0:6] == 'import': txt += '<PRE>' + strip_text_after_string(line[7:], ' as ') + '</PRE>\n' return txt + '<BR>'
This is a sample program to show how a learning agent can be logged using AIKIF. The idea is that this main function is your algorithm, which will run until it finds a successful result. The result is returned and the time taken is logged. There can optionally be have additional functions ...
def main(arg1=55, arg2='test', arg3=None): """ This is a sample program to show how a learning agent can be logged using AIKIF. The idea is that this main function is your algorithm, which will run until it finds a successful result. The result is returned and the time taken is logged. ...
get a set of keys from redis
def get(self, key): """ get a set of keys from redis """ res = self.connection.get(key) print(res) return res
import a datatable (grid) by using the schema:table:column as keys. e.g. Sample input ( via cls_database.py -> test.csv) TERM,GENDER,ID,tot1,tot2 5320,M,78,18,66 1310,M,78,10,12 Loads the following:
def import_datatable(self, l_datatable, schema='datatable', col_key=0): """ import a datatable (grid) by using the schema:table:column as keys. e.g. Sample input ( via cls_database.py -> test.csv) TERM,GENDER,ID,tot1,tot2 5320,M,78,18,66 1310,M,78,10,12 L...
Creator function for creating an instance of a Packer image script.
def creator(_, config): """Creator function for creating an instance of a Packer image script.""" packer_script = render(config.script, model=config.model, env=config.env, variables=config.variables, item=config.item) filename = "packer.dry.run.see.comment" ...
Generates an optimized JPEG from JPEG-encoded bytes. :param bytes_in: the input image's bytes :param quality: the output JPEG quality (default 95) :returns: Optimized JPEG bytes :rtype: bytes :raises ValueError: Guetzli was not able to decode the image (the image is probab...
def process_jpeg_bytes(bytes_in, quality=DEFAULT_JPEG_QUALITY): """Generates an optimized JPEG from JPEG-encoded bytes. :param bytes_in: the input image's bytes :param quality: the output JPEG quality (default 95) :returns: Optimized JPEG bytes :rtype: bytes :raises ValueError: Guetzli was no...
Generates an optimized JPEG from RGB bytes. :param bytes bytes_in: the input image's bytes :param int width: the width of the input image :param int height: the height of the input image :param int quality: the output JPEG quality (default 95) :returns: Optimized JPEG bytes :rtype: bytes ...
def process_rgb_bytes(bytes_in, width, height, quality=DEFAULT_JPEG_QUALITY): """Generates an optimized JPEG from RGB bytes. :param bytes bytes_in: the input image's bytes :param int width: the width of the input image :param int height: the height of the input image :param int quality: the output ...
Decorator for a class to make a singleton out of it. @type the_class: class @param the_class: the class that should work as a singleton @rtype: decorator @return: decorator
def singleton(the_class): """ Decorator for a class to make a singleton out of it. @type the_class: class @param the_class: the class that should work as a singleton @rtype: decorator @return: decorator """ class_instances = {} def get_instance(*args, **kwargs): """ ...
Breadth first search
def find_path_BFS(Graph,n,m): """ Breadth first search """ if m not in Graph: return None if n == m: return [m] path = [[n]] searched = [] while True: j = len(path) #k = len(Graph[n]) for i in range(j): node = path[i][-1] fo...
assumes start and target are an (x,y) grid
def heuristic_cost(self, start, target): """ assumes start and target are an (x,y) grid """ (x1, y1) = start (x2, y2) = target return abs(x1 - x2) + abs(y1 - y2)
builds a 2048 starting board Printing Grid 0 0 0 2 0 0 4 0 0 0 0 0 0 0 0 0
def build_board_2048(): """ builds a 2048 starting board Printing Grid 0 0 0 2 0 0 4 0 0 0 0 0 0 0 0 0 """ grd = Grid(4,4, [2,4]) grd.new_tile() grd.new_tile() print(grd) return grd
builds a checkers starting board Printing Grid 0 B 0 B 0 B 0 B B 0 B 0 B 0 B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
def build_board_checkers(): """ builds a checkers starting board Printing Grid 0 B 0 B 0 B 0 B B 0 B 0 B 0 B 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
tests for this module
def TEST(): """ tests for this module """ grd = Grid(4,4, [2,4]) grd.new_tile() grd.new_tile() print(grd) print("There are ", grd.count_blank_positions(), " blanks in grid 1\n") grd2 = Grid(5,5, ['A','B']) grd2.new_tile(26) print(grd2) build_board_checkers() print("There ar...
Returns the full path to the file, including leading '/' and bucket name. Access to the bucket root are not allowed.
def path(self, name): """ Returns the full path to the file, including leading '/' and bucket name. Access to the bucket root are not allowed. """ if not name: raise SuspiciousOperation("Attempted access to '%s' denied." % name) return os.path.join(self._bucke...
TODO collect directories
def listdir(self, name): """ TODO collect directories """ return [], [obj.filename for obj in cloudstorage.listbucket(self.path(name))]
Ask blobstore api for an url to directly serve the file
def url(self, name): """ Ask blobstore api for an url to directly serve the file """ key = blobstore.create_gs_key('/gs' + name) return images.get_serving_url(key)
Processing one stage.
def process(self, stage): """Processing one stage.""" self.logger.info("Processing pipeline stage '%s'", self.title) output = [] for entry in stage: key = list(entry.keys())[0] if key == "env": self.pipeline.data.env_list[1].update(entry[key]) ...
Setter method for virtual_mac, mapped from YANG variable /rbridge_id/interface/ve/ipv6/vrrpv3e/virtual_mac (container) If this variable is read-only (config: false) in the source YANG file, then _set_virtual_mac is considered as a private method. Backends looking to populate this variable should do so v...
def _set_virtual_mac(self, v, load=False): """ Setter method for virtual_mac, mapped from YANG variable /rbridge_id/interface/ve/ipv6/vrrpv3e/virtual_mac (container) If this variable is read-only (config: false) in the source YANG file, then _set_virtual_mac is considered as a private method. Backen...
Setter method for disable_res, mapped from YANG variable /ha/process_restart/disable_res (container) If this variable is read-only (config: false) in the source YANG file, then _set_disable_res is considered as a private method. Backends looking to populate this variable should do so via calling thisObj...
def _set_disable_res(self, v, load=False): """ Setter method for disable_res, mapped from YANG variable /ha/process_restart/disable_res (container) If this variable is read-only (config: false) in the source YANG file, then _set_disable_res is considered as a private method. Backends looking to popu...
Setter method for redundancy, mapped from YANG variable /brocade_ha_rpc/redundancy (rpc) If this variable is read-only (config: false) in the source YANG file, then _set_redundancy is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_redunda...
def _set_redundancy(self, v, load=False): """ Setter method for redundancy, mapped from YANG variable /brocade_ha_rpc/redundancy (rpc) If this variable is read-only (config: false) in the source YANG file, then _set_redundancy is considered as a private method. Backends looking to populate this vari...
Setter method for reload, mapped from YANG variable /brocade_ha_rpc/reload (rpc) If this variable is read-only (config: false) in the source YANG file, then _set_reload is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_reload() directly.
def _set_reload(self, v, load=False): """ Setter method for reload, mapped from YANG variable /brocade_ha_rpc/reload (rpc) If this variable is read-only (config: false) in the source YANG file, then _set_reload is considered as a private method. Backends looking to populate this variable should ...
Setter method for circuit_type, mapped from YANG variable /isis_state/interface_brief/isis_intf_brief/circuit_type (isis-circ-type) If this variable is read-only (config: false) in the source YANG file, then _set_circuit_type is considered as a private method. Backends looking to populate this variable shou...
def _set_circuit_type(self, v, load=False): """ Setter method for circuit_type, mapped from YANG variable /isis_state/interface_brief/isis_intf_brief/circuit_type (isis-circ-type) If this variable is read-only (config: false) in the source YANG file, then _set_circuit_type is considered as a private ...
Fetch trading fees.
def trading_fees(self) -> TradingFees: """Fetch trading fees.""" return self._fetch('trading fees', self.market.code)(self._trading_fees)()
Fetch the market ticker.
def fetch_ticker(self) -> Ticker: """Fetch the market ticker.""" return self._fetch('ticker', self.market.code)(self._ticker)()
Fetch the order book.
def fetch_order_book(self) -> OrderBook: """Fetch the order book.""" return self._fetch('order book', self.market.code)(self._order_book)()
Fetch trades since given timestamp.
def fetch_trades_since(self, since: int) -> List[Trade]: """Fetch trades since given timestamp.""" return self._fetch_since('trades', self.market.code)(self._trades_since)(since)
Fetch latest deposits, must provide a limit.
def fetch_deposits(self, limit: int) -> List[Deposit]: """Fetch latest deposits, must provide a limit.""" return self._transactions(self._deposits, 'deposits', limit)
Fetch all deposits since the given timestamp.
def fetch_deposits_since(self, since: int) -> List[Deposit]: """Fetch all deposits since the given timestamp.""" return self._transactions_since(self._deposits_since, 'deposits', since)
Fetch latest withdrawals, must provide a limit.
def fetch_withdrawals(self, limit: int) -> List[Withdrawal]: """Fetch latest withdrawals, must provide a limit.""" return self._transactions(self._withdrawals, 'withdrawals', limit)
Fetch all withdrawals since the given timestamp.
def fetch_withdrawals_since(self, since: int) -> List[Withdrawal]: """Fetch all withdrawals since the given timestamp.""" return self._transactions_since(self._withdrawals_since, 'withdrawals', since)
Request a withdrawal.
def request_withdrawal(self, amount: Number, address: str, subtract_fee: bool=False, **params) -> Withdrawal: """Request a withdrawal.""" self.log.debug(f'Requesting {self.currency} withdrawal from {self.name} to {address}') amount = self._parse_money(amount) if self.dry_run: ...
Fetch an order by ID.
def fetch_order(self, order_id: str) -> Order: """Fetch an order by ID.""" return self._fetch(f'order id={order_id}', exc=OrderNotFound)(self._order)(order_id)
Fetch latest open orders, must provide a limit.
def fetch_open_orders(self, limit: int) -> List[Order]: """Fetch latest open orders, must provide a limit.""" return self._fetch_orders_limit(self._open_orders, limit)
Fetch latest closed orders, must provide a limit.
def fetch_closed_orders(self, limit: int) -> List[Order]: """Fetch latest closed orders, must provide a limit.""" return self._fetch_orders_limit(self._closed_orders, limit)
Fetch closed orders since the given timestamp.
def fetch_closed_orders_since(self, since: int) -> List[Order]: """Fetch closed orders since the given timestamp.""" return self._fetch_orders_since(self._closed_orders_since, since)
Cancel an order by ID.
def cancel_order(self, order_id: str) -> str: """Cancel an order by ID.""" self.log.debug(f'Canceling order id={order_id} on {self.name}') if self.dry_run: # Don't cancel if dry run self.log.warning(f'DRY RUN: Order cancelled on {self.name}: id={order_id}') return order...
Cancel multiple orders by a list of IDs.
def cancel_orders(self, order_ids: List[str]) -> List[str]: """Cancel multiple orders by a list of IDs.""" orders_to_cancel = order_ids self.log.debug(f'Canceling orders on {self.name}: ids={orders_to_cancel}') cancelled_orders = [] if self.dry_run: # Don't cancel if dry run ...
Cancel all open orders.
def cancel_all_orders(self) -> List[str]: """Cancel all open orders.""" order_ids = [o.id for o in self.fetch_all_open_orders()] return self.cancel_orders(order_ids)
Minimum amount to place an order.
def min_order_amount(self) -> Money: """Minimum amount to place an order.""" return self._fetch('minimum order amount', self.market.code)(self._min_order_amount)()
Place an order.
def place_order(self, side: Side, order_type: OrderType, amount: Number, price: Number=None) -> Order: """Place an order.""" order_repr = f'side={side} type={order_type} amount={amount} price={price}' order_err = f'Failed to place order on {self.name}!: {order_repr}' self.log.debug(f'Pl...
Place a market order.
def place_market_order(self, side: Side, amount: Number) -> Order: """Place a market order.""" return self.place_order(side, OrderType.MARKET, amount)
Place a limit order.
def place_limit_order(self, side: Side, amount: Number, price: Number) -> Order: """Place a limit order.""" return self.place_order(side, OrderType.LIMIT, amount, price)
Setter method for node_id, mapped from YANG variable /node_id (list) If this variable is read-only (config: false) in the source YANG file, then _set_node_id is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_node_id() directly.
def _set_node_id(self, v, load=False): """ Setter method for node_id, mapped from YANG variable /node_id (list) If this variable is read-only (config: false) in the source YANG file, then _set_node_id is considered as a private method. Backends looking to populate this variable should do so via ...
Setter method for firmware, mapped from YANG variable /firmware (container) If this variable is read-only (config: false) in the source YANG file, then _set_firmware is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_firmware() directly.
def _set_firmware(self, v, load=False): """ Setter method for firmware, mapped from YANG variable /firmware (container) If this variable is read-only (config: false) in the source YANG file, then _set_firmware is considered as a private method. Backends looking to populate this variable should d...
Setter method for igmp_snooping_state, mapped from YANG variable /igmp_snooping_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_igmp_snooping_state is considered as a private method. Backends looking to populate this variable should do so via calling th...
def _set_igmp_snooping_state(self, v, load=False): """ Setter method for igmp_snooping_state, mapped from YANG variable /igmp_snooping_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_igmp_snooping_state is considered as a private method. Backends lo...
Setter method for police_remark_profile, mapped from YANG variable /police_remark_profile (list) If this variable is read-only (config: false) in the source YANG file, then _set_police_remark_profile is considered as a private method. Backends looking to populate this variable should do so via calling t...
def _set_police_remark_profile(self, v, load=False): """ Setter method for police_remark_profile, mapped from YANG variable /police_remark_profile (list) If this variable is read-only (config: false) in the source YANG file, then _set_police_remark_profile is considered as a private method. Backends...
Setter method for hardware, mapped from YANG variable /hardware (container) If this variable is read-only (config: false) in the source YANG file, then _set_hardware is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_hardware() directly. ...
def _set_hardware(self, v, load=False): """ Setter method for hardware, mapped from YANG variable /hardware (container) If this variable is read-only (config: false) in the source YANG file, then _set_hardware is considered as a private method. Backends looking to populate this variable should d...
Setter method for zoning, mapped from YANG variable /zoning (container) If this variable is read-only (config: false) in the source YANG file, then _set_zoning is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_zoning() directly.
def _set_zoning(self, v, load=False): """ Setter method for zoning, mapped from YANG variable /zoning (container) If this variable is read-only (config: false) in the source YANG file, then _set_zoning is considered as a private method. Backends looking to populate this variable should do so via...
Setter method for resource_monitor, mapped from YANG variable /resource_monitor (container) If this variable is read-only (config: false) in the source YANG file, then _set_resource_monitor is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._se...
def _set_resource_monitor(self, v, load=False): """ Setter method for resource_monitor, mapped from YANG variable /resource_monitor (container) If this variable is read-only (config: false) in the source YANG file, then _set_resource_monitor is considered as a private method. Backends looking to pop...
Setter method for acl_state, mapped from YANG variable /acl_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_acl_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_acl_state() directl...
def _set_acl_state(self, v, load=False): """ Setter method for acl_state, mapped from YANG variable /acl_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_acl_state is considered as a private method. Backends looking to populate this variable should ...
Setter method for cpu_queue_info_state, mapped from YANG variable /cpu_queue_info_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_queue_info_state is considered as a private method. Backends looking to populate this variable should do so via calling...
def _set_cpu_queue_info_state(self, v, load=False): """ Setter method for cpu_queue_info_state, mapped from YANG variable /cpu_queue_info_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_cpu_queue_info_state is considered as a private method. Backend...
Setter method for filter_info_state, mapped from YANG variable /filter_info_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_filter_info_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj....
def _set_filter_info_state(self, v, load=False): """ Setter method for filter_info_state, mapped from YANG variable /filter_info_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_filter_info_state is considered as a private method. Backends looking to...
Setter method for overlay_service_policy_brief_state, mapped from YANG variable /overlay_service_policy_brief_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_service_policy_brief_state is considered as a private method. Backends looking to populate ...
def _set_overlay_service_policy_brief_state(self, v, load=False): """ Setter method for overlay_service_policy_brief_state, mapped from YANG variable /overlay_service_policy_brief_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_service_policy_br...
Setter method for vxlan_stats_acl_state, mapped from YANG variable /vxlan_stats_acl_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_vxlan_stats_acl_state is considered as a private method. Backends looking to populate this variable should do so via call...
def _set_vxlan_stats_acl_state(self, v, load=False): """ Setter method for vxlan_stats_acl_state, mapped from YANG variable /vxlan_stats_acl_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_vxlan_stats_acl_state is considered as a private method. Bac...
Setter method for overlay_class_map, mapped from YANG variable /overlay_class_map (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_class_map is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_...
def _set_overlay_class_map(self, v, load=False): """ Setter method for overlay_class_map, mapped from YANG variable /overlay_class_map (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_class_map is considered as a private method. Backends looking to popu...
Setter method for overlay_policy_map, mapped from YANG variable /overlay_policy_map (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_policy_map is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._s...
def _set_overlay_policy_map(self, v, load=False): """ Setter method for overlay_policy_map, mapped from YANG variable /overlay_policy_map (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_policy_map is considered as a private method. Backends looking to ...
Setter method for overlay_transit, mapped from YANG variable /overlay_transit (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_transit is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_overla...
def _set_overlay_transit(self, v, load=False): """ Setter method for overlay_transit, mapped from YANG variable /overlay_transit (list) If this variable is read-only (config: false) in the source YANG file, then _set_overlay_transit is considered as a private method. Backends looking to populate thi...
Setter method for routing_system, mapped from YANG variable /routing_system (container) If this variable is read-only (config: false) in the source YANG file, then _set_routing_system is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_rout...
def _set_routing_system(self, v, load=False): """ Setter method for routing_system, mapped from YANG variable /routing_system (container) If this variable is read-only (config: false) in the source YANG file, then _set_routing_system is considered as a private method. Backends looking to populate th...
Setter method for vc_peer_state, mapped from YANG variable /vc_peer_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_vc_peer_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_vc_peer...
def _set_vc_peer_state(self, v, load=False): """ Setter method for vc_peer_state, mapped from YANG variable /vc_peer_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_vc_peer_state is considered as a private method. Backends looking to populate this v...
Setter method for openflow_state, mapped from YANG variable /openflow_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_openflow_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_open...
def _set_openflow_state(self, v, load=False): """ Setter method for openflow_state, mapped from YANG variable /openflow_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_openflow_state is considered as a private method. Backends looking to populate th...
Setter method for queues_state, mapped from YANG variable /queues_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_queues_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_queues_sta...
def _set_queues_state(self, v, load=False): """ Setter method for queues_state, mapped from YANG variable /queues_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_queues_state is considered as a private method. Backends looking to populate this varia...
Setter method for mctd_client_state_state, mapped from YANG variable /mctd_client_state_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_mctd_client_state_state is considered as a private method. Backends looking to populate this variable should do so vi...
def _set_mctd_client_state_state(self, v, load=False): """ Setter method for mctd_client_state_state, mapped from YANG variable /mctd_client_state_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_mctd_client_state_state is considered as a private met...
Setter method for ptp_state, mapped from YANG variable /ptp_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_ptp_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_ptp_state() directl...
def _set_ptp_state(self, v, load=False): """ Setter method for ptp_state, mapped from YANG variable /ptp_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_ptp_state is considered as a private method. Backends looking to populate this variable should ...
Setter method for monitor, mapped from YANG variable /monitor (container) If this variable is read-only (config: false) in the source YANG file, then _set_monitor is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_monitor() directly.
def _set_monitor(self, v, load=False): """ Setter method for monitor, mapped from YANG variable /monitor (container) If this variable is read-only (config: false) in the source YANG file, then _set_monitor is considered as a private method. Backends looking to populate this variable should do so...
Setter method for mac, mapped from YANG variable /mac (container) If this variable is read-only (config: false) in the source YANG file, then _set_mac is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_mac() directly.
def _set_mac(self, v, load=False): """ Setter method for mac, mapped from YANG variable /mac (container) If this variable is read-only (config: false) in the source YANG file, then _set_mac is considered as a private method. Backends looking to populate this variable should do so via calling thi...
Setter method for terminal_cfg, mapped from YANG variable /terminal_cfg (container) If this variable is read-only (config: false) in the source YANG file, then _set_terminal_cfg is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_terminal_c...
def _set_terminal_cfg(self, v, load=False): """ Setter method for terminal_cfg, mapped from YANG variable /terminal_cfg (container) If this variable is read-only (config: false) in the source YANG file, then _set_terminal_cfg is considered as a private method. Backends looking to populate this varia...
Setter method for mpls_state, mapped from YANG variable /mpls_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_mpls_state is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_mpls_state() dir...
def _set_mpls_state(self, v, load=False): """ Setter method for mpls_state, mapped from YANG variable /mpls_state (container) If this variable is read-only (config: false) in the source YANG file, then _set_mpls_state is considered as a private method. Backends looking to populate this variable shou...