text
stringlengths
18
773k
def face_index(vertices): """Takes an MxNx3 array and returns a 2D vertices and MxN face_indices arrays""" new_verts = [] face_indices = [] for wall in vertices: face_wall = [] for vert in wall: if new_verts: if not np.isclose(vert, new_verts).all(axis=1).any(...
def fan_triangulate(indices): """Return an array of vertices in triangular order using a fan triangulation algorithm.""" if len(indices[0]) != 4: raise ValueError("Assumes working with a sequence of quad indices") new_indices = [] for face in indices: new_indices.extend([face[:-1], face[...
def from_dicts(cls, mesh_name, vert_dict, normal_dict): """Returns a wavefront .obj string using pre-triangulated vertex dict and normal dict as reference.""" # Put header in string wavefront_str = "o {name}\n".format(name=mesh_name) # Write Vertex data from vert_dict for wall ...
def from_arrays(cls, name, verts, normals, n_verts=3): """Returns a wavefront .obj string using pre-triangulated vertex dict and normal dict as reference.""" # Put header in string wavefront_str = "o {name}\n".format(name=name) # Write Vertex data from vert_dict for vert in ve...
def from_indexed_arrays(cls, name, verts, normals): """Takes MxNx3 verts, Mx3 normals to build obj file""" # Put header in string wavefront_str = "o {name}\n".format(name=name) new_verts, face_indices = face_index(verts) assert new_verts.shape[1] == 3, "verts should be Nx3 arr...
def dump(self, f): """Write Wavefront data to file. Takes File object or filename.""" try: f.write(self._data) except AttributeError: with open(f, 'w') as wf: wf.write(self._data)
def scrypt(password, salt, N=SCRYPT_N, r=SCRYPT_r, p=SCRYPT_p, olen=64): """Returns a key derived using the scrypt key-derivarion function N must be a power of two larger than 1 but no larger than 2 ** 63 (insane) r and p must be positive numbers such that r * p < 2 ** 30 The default values are: N...
def doIt(rh): """ Perform the requested function by invoking the subfunction handler. Input: Request Handle Output: Request Handle updated with parsed input. Return code - 0: ok, non-zero: error """ rh.printSysLog("Enter cmdVM.doIt") # Show the invocation parameters,...
def invokeCmd(rh): """ Invoke the command in the virtual machine's operating system. Input: Request Handle with the following properties: function - 'CMDVM' subfunction - 'CMD' userid - userid of the virtual machine parms['cmd'] - Command to send ...
def parseCmdline(rh): """ Parse the request command input. Input: Request Handle Output: Request Handle updated with parsed input. Return code - 0: ok, non-zero: error """ rh.printSysLog("Enter cmdVM.parseCmdline") if rh.totalParms >= 2: rh.userid = rh.reques...
def _generate_vdev(self, base, offset): """Generate virtual device number based on base vdev :param base: base virtual device number, string of 4 bit hex. :param offset: offset to base, integer. """ vdev = hex(int(base, 16) + offset)[2:] return vdev.rjust(4, '0')
def generate_disk_vdev(self, start_vdev=None, offset=0): """Generate virtual device number for disks :param offset: offset of user_root_vdev. :return: virtual device number, string of 4 bit hex. """ if not start_vdev: start_vdev = CONF.zvm.user_root_vdev vdev ...
def add_mdisks(self, userid, disk_list, start_vdev=None): """Add disks for the userid :disks: A list dictionary to describe disk info, for example: disk: [{'size': '1g', 'format': 'ext3', 'disk_pool': 'ECKD:eckdpool1'}] """ ...
def dedicate_device(self, userid, vaddr, raddr, mode): """dedicate device :userid: The name of the image obtaining a dedicated device :vaddr: The virtual device number of the device :raddr: A real device number to be dedicated or attached to the specified image :...
def _dedicate_device(self, userid, vaddr, raddr, mode): """dedicate device.""" action = 'dedicate' rd = ('changevm %(uid)s %(act)s %(va)s %(ra)s %(mod)i' % {'uid': userid, 'act': action, 'va': vaddr, 'ra': raddr, 'mod': mode}) action = "dedicate device to use...
def get_fcp_info_by_status(self, userid, status): """get fcp information by the status. :userid: The name of the image to query fcp info :status: The status of target fcps. eg:'active', 'free' or 'offline'. """ results = self._get_fcp_info_by_status(userid, status) retu...
def _undedicate_device(self, userid, vaddr): """undedicate device.""" action = 'undedicate' rd = ('changevm %(uid)s %(act)s %(va)s' % {'uid': userid, 'act': action, 'va': vaddr}) action = "undedicate device from userid '%s'" % userid with zvmutils.log...
def get_image_performance_info(self, userid): """Get CPU and memory usage information. :userid: the zvm userid to be queried """ pi_dict = self.image_performance_query([userid]) return pi_dict.get(userid, None)
def _parse_vswitch_inspect_data(self, rd_list): """ Parse the Virtual_Network_Vswitch_Query_Byte_Stats data to get inspect data. """ def _parse_value(data_list, idx, keyword, offset): return idx + offset, data_list[idx].rpartition(keyword)[2].strip() vsw_dict = {} ...
def get_power_state(self, userid): """Get power status of a z/VM instance.""" LOG.debug('Querying power stat of %s' % userid) requestData = "PowerVM " + userid + " status" action = "query power state of '%s'" % userid with zvmutils.log_and_reraise_smt_request_failed(action): ...
def guest_start(self, userid): """Power on VM.""" requestData = "PowerVM " + userid + " on" with zvmutils.log_and_reraise_smt_request_failed(): self._request(requestData)
def guest_stop(self, userid, **kwargs): """Power off VM.""" requestData = "PowerVM " + userid + " off" if 'timeout' in kwargs.keys() and kwargs['timeout']: requestData += ' --maxwait ' + str(kwargs['timeout']) if 'poll_interval' in kwargs.keys() and kwargs['poll_interval']: ...
def live_migrate_move(self, userid, destination, parms): """ moves the specified virtual machine, while it continues to run, to the specified system within the SSI cluster. """ rd = ('migratevm %(uid)s move --destination %(dest)s ' % {'uid': userid, 'dest': destination}) ...
def create_vm(self, userid, cpu, memory, disk_list, profile, max_cpu, max_mem, ipl_from, ipl_param, ipl_loadparam): """ Create VM and add disks if specified. """ rd = ('makevm %(uid)s directory LBYONLY %(mem)im %(pri)s ' '--cpus %(cpu)i --profile %(prof)s --maxCPU %(max_c...
def _add_mdisk(self, userid, disk, vdev): """Create one disk for userid NOTE: No read, write and multi password specified, and access mode default as 'MR'. """ size = disk['size'] fmt = disk.get('format', 'ext4') disk_pool = disk.get('disk_pool') or CONF.zvm.dis...
def get_vm_list(self): """Get the list of guests that are created by SDK return userid list""" action = "list all guests in database" with zvmutils.log_and_reraise_sdkbase_error(action): guests_in_db = self._GuestDbOperator.get_guest_list() guests_migrated = self....
def guest_authorize_iucv_client(self, userid, client=None): """Punch a script that used to set the authorized client userid in vm If the guest is in log off status, the change will take effect when the guest start up at first time. If the guest is in active status, power off and power on...
def guest_deploy(self, userid, image_name, transportfiles=None, remotehost=None, vdev=None): """ Deploy image and punch config driver to target """ # (TODO: add the support of multiple disks deploy) msg = ('Start to deploy image %(img)s to guest %(vm)s' % {'i...
def grant_user_to_vswitch(self, vswitch_name, userid): """Set vswitch to grant user.""" smt_userid = zvmutils.get_smt_userid() requestData = ' '.join(( 'SMAPI %s API Virtual_Network_Vswitch_Set_Extended' % smt_userid, "--operands", "-k switch_name=%s" % vswitc...
def image_performance_query(self, uid_list): """Call Image_Performance_Query to get guest current status. :uid_list: A list of zvm userids to be queried """ if uid_list == []: return {} if not isinstance(uid_list, list): uid_list = [uid_list] sm...
def system_image_performance_query(self, namelist): """Call System_Image_Performance_Query to get guest current status. :namelist: A namelist that defined in smapi namelist file. """ smt_userid = zvmutils.get_smt_userid() rd = ' '.join(( "SMAPI %s API System_Image_Pe...
def set_vswitch(self, switch_name, **kwargs): """Set vswitch""" smt_userid = zvmutils.get_smt_userid() rd = ' '.join(( "SMAPI %s API Virtual_Network_Vswitch_Set_Extended" % smt_userid, "--operands", "-k switch_name=%s" % switch_name)) for ...
def _couple_nic(self, userid, vdev, vswitch_name, active=False): """Couple NIC to vswitch by adding vswitch into user direct.""" if active: self._is_active(userid) msg = ('Start to couple nic device %(vdev)s of guest %(vm)s ' 'with vswitch %(vsw)s'...
def couple_nic_to_vswitch(self, userid, nic_vdev, vswitch_name, active=False): """Couple nic to vswitch.""" if active: msg = ("both in the user direct of guest %s and on " "the active guest system" % userid) else: msg = "in...
def _uncouple_nic(self, userid, vdev, active=False): """Uncouple NIC from vswitch""" if active: self._is_active(userid) msg = ('Start to uncouple nic device %(vdev)s of guest %(vm)s' % {'vdev': vdev, 'vm': userid}) LOG.info(msg) requestData = ' '.join...
def execute_cmd(self, userid, cmdStr): """"cmdVM.""" requestData = 'cmdVM ' + userid + ' CMD \'' + cmdStr + '\'' with zvmutils.log_and_reraise_smt_request_failed(action='execute ' 'command on vm via iucv channel'): results = self._request(requestData) ret = results['...
def execute_cmd_direct(self, userid, cmdStr): """"cmdVM.""" requestData = 'cmdVM ' + userid + ' CMD \'' + cmdStr + '\'' results = self._smt.request(requestData) return results
def image_import(self, image_name, url, image_meta, remote_host=None): """Import the image specified in url to SDK image repository, and create a record in image db, the imported images are located in image_repository/prov_method/os_version/image_name/, for example, /opt/sdk/images/netbo...
def image_export(self, image_name, dest_url, remote_host=None): """Export the specific image to remote host or local file system :param image_name: image name that can be uniquely identify an image :param dest_path: the location to store exported image, eg. /opt/images, the image will be...
def _get_image_size(self, image_path): """Return disk size in bytes""" command = 'du -b %s' % image_path (rc, output) = zvmutils.execute(command) if rc: msg = ("Error happened when executing command du -b with" "reason: %s" % output) LOG.error(m...
def _get_md5sum(self, fpath): """Calculate the md5sum of the specific image file""" try: current_md5 = hashlib.md5() if isinstance(fpath, six.string_types) and os.path.exists(fpath): with open(fpath, "rb") as fh: for chunk in self._read_chunks(...
def image_get_root_disk_size(self, image_name): """Return the root disk units of the specified image image_name: the unique image name in db Return the disk units in format like 3339:CYL or 467200:BLK """ image_info = self.image_query(image_name) if not image_info: ...
def get_guest_connection_status(self, userid): '''Get guest vm connection status.''' rd = ' '.join(('getvm', userid, 'isreachable')) results = self._request(rd) if results['rs'] == 1: return True else: return False
def process_additional_minidisks(self, userid, disk_info): '''Generate and punch the scripts used to process additional disk into target vm's reader. ''' for idx, disk in enumerate(disk_info): vdev = disk.get('vdev') or self.generate_disk_vdev( ...
def _request_with_error_ignored(self, rd): """Send smt request, log and ignore any errors.""" try: return self._request(rd) except Exception as err: # log as warning and ignore namelist operation failures LOG.warning(six.text_type(err))
def image_import(cls, image_name, url, target, **kwargs): """Import image from remote host to local image repository using scp. If remote_host not specified, it means the source file exist in local file system, just copy the image to image repository """ source = urlparse.urlpars...
def image_export(cls, source_path, dest_url, **kwargs): """Export the specific image to remote host or local file system """ dest_path = urlparse.urlparse(dest_url).path if kwargs['remote_host']: target_path = ':'.join([kwargs['remote_host'], dest_path]) command = ' '.joi...
def dedent(func): """ Dedent the docstring of a function and substitute with :attr:`params` Parameters ---------- func: function function with the documentation to dedent""" if isinstance(func, types.MethodType) and not six.PY3: func = func.im_func func.__doc__ = func.__doc_...
def indent(text, num=4): """Indet the given string""" str_indent = ' ' * num return str_indent + ('\n' + str_indent).join(text.splitlines())
def append_original_doc(parent, num=0): """Return an iterator that append the docstring of the given `parent` function to the applied function""" def func(func): func.__doc__ = func.__doc__ and func.__doc__ + indent( parent.__doc__, num) return func return func
def get_sections(self, s, base, sections=[ 'Parameters', 'Other Parameters', 'Possible types']): """ Extract the specified sections out of the given string The same as the :meth:`docrep.DocstringProcessor.get_sections` method but uses the ``'Possible types'`` section by defa...
def create_config_drive(network_interface_info, os_version): """Generate config driver for zVM guest vm. :param dict network_interface_info: Required keys: ip_addr - (str) IP address nic_vdev - (str) VDEV of the nic gateway_v4 - IPV4 gateway broadcast_v4 - IPV4 broadcast address...
def scrypt(password, salt, N=SCRYPT_N, r=SCRYPT_r, p=SCRYPT_p, olen=64): """Returns a key derived using the scrypt key-derivarion function N must be a power of two larger than 1 but no larger than 2 ** 63 (insane) r and p must be positive numbers such that r * p < 2 ** 30 The default values are: N...
def set(self, ctype, key, data): """Set or update cache content. :param ctype: cache type :param key: the key to be set value :param data: cache data """ with zvmutils.acquire_lock(self._lock): target_cache = self._get_ctype_cache(ctype) target_ca...
def GoodResponse(body, request, status_code=None, headers=None): """ Construct a Good HTTP response (defined in DEFAULT_GOOD_RESPONSE_CODE) :param body: The body of the response :type body: ``str`` :param request: The HTTP request :type request: :...
def BadResponse(body, request, status_code=None, headers=None): """ Construct a Bad HTTP response (defined in DEFAULT_BAD_RESPONSE_CODE) :param body: The body of the response :type body: ``str`` :param request: The HTTP request :type request: :clas...
def disable_warnings(critical=False): """Function that disables all warnings and all critical warnings (if critical evaluates to True) related to the psyplot Module. Please note that you can also configure the warnings via the psyplot.warning logger (logging.getLogger(psyplot.warning)).""" warnings....
def warn(message, category=PsyPlotWarning, logger=None): """wrapper around the warnings.warn function for non-critical warnings. logger may be a logging.Logger instance""" if logger is not None: message = "[Warning by %s]\n%s" % (logger.name, message) warnings.warn(message, category, stacklevel=...
def critical(message, category=PsyPlotCritical, logger=None): """wrapper around the warnings.warn function for critical warnings. logger may be a logging.Logger instance""" if logger is not None: message = "[Critical warning by %s]\n%s" % (logger.name, message) warnings.warn(message, category, s...
def customwarn(message, category, filename, lineno, *args, **kwargs): """Use the psyplot.warning logger for categories being out of PsyPlotWarning and PsyPlotCritical and the default warnings.showwarning function for all the others.""" if category is PsyPlotWarning: logger.warning(warnings.forma...
def _get_home(): """Find user's home directory if possible. Otherwise, returns None. :see: http://mail.python.org/pipermail/python-list/2005-February/325395.html This function is copied from matplotlib version 1.4.3, Jan 2016 """ try: if six.PY2 and sys.platform == 'win32': ...
def match_url(self, request): """ Match the request against a file in the adapter directory :param request: The request :type request: :class:`requests.Request` :return: Path to the file :rtype: ``str`` """ parsed_url = urlparse(request.path_url) ...
def _reindex(self): """ Create a case-insensitive index of the paths """ self.index = [] for path in self.paths: target_path = os.path.normpath(os.path.join(BASE_PATH, path)) for root, subdirs, files ...
def add3390(rh): """ Adds a 3390 (ECKD) disk to a virtual machine's directory entry. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'ADD3390' userid - userid of the virtual machine parms['diskPool'] - Disk po...
def add9336(rh): """ Adds a 9336 (FBA) disk to virtual machine's directory entry. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'ADD9336' userid - userid of the virtual machine parms['diskPool'] - Disk pool ...
def dedicate(rh): """ Dedicate device. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'DEDICATEDM' userid - userid of the virtual machine parms['vaddr'] - Virtual address parms['raddr'] - Re...
def addAEMOD(rh): """ Send an Activation Modification Script to the virtual machine. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'AEMOD' userid - userid of the virtual machine parms['aeScript'] - File spec...
def addLOADDEV(rh): """ Sets the LOADDEV statement in the virtual machine's directory entry. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'ADDLOADDEV' userid - userid of the virtual machine parms['boot'] ...
def punchFile(rh): """ Punch a file to a virtual reader of the specified virtual machine. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'PUNCHFILE' userid - userid of the virtual machine parms['class'] - Sp...
def purgeRDR(rh): """ Purge the reader belonging to the virtual machine. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'PURGERDR' userid - userid of the virtual machine Output: Request Handle updated with th...
def removeDisk(rh): """ Remove a disk from a virtual machine. Input: Request Handle with the following properties: function - 'CHANGEVM' subfunction - 'REMOVEDISK' userid - userid of the virtual machine parms['vaddr'] - Virtual address...
def showInvLines(rh): """ Produce help output related to command synopsis Input: Request Handle """ if rh.subfunction != '': rh.printLn("N", "Usage:") rh.printLn("N", " python " + rh.cmdName + " ChangeVM <userid> add3390 <diskPool> <vAddr>") rh.printLn("N", "...
def showOperandLines(rh): """ Produce help output related to operands. Input: Request Handle """ if rh.function == 'HELP': rh.printLn("N", " For the ChangeVM function:") else: rh.printLn("N", "Sub-Functions(s):") rh.printLn("N", " add3390 - Add a 3390 (EC...
def send_request(self, api_name, *api_args, **api_kwargs): """Refer to SDK API documentation. :param api_name: SDK API name :param *api_args: SDK API sequence parameters :param **api_kwargs: SDK API keyword parameters """ return self.conn.request(api_name, *...
def getDiskPoolNames(rh): """ Obtain the list of disk pools known to the directory manager. Input: Request Handle with the following properties: function - 'GETHOST' subfunction - 'DISKPOOLNAMES' Output: Request Handle updated with the results. Return code -...
def getDiskPoolSpace(rh): """ Obtain disk pool space information for all or a specific disk pool. Input: Request Handle with the following properties: function - 'GETHOST' subfunction - 'DISKPOOLSPACE' parms['poolName'] - Name of the disk pool. Opti...
def getFcpDevices(rh): """ Lists the FCP device channels that are active, free, or offline. Input: Request Handle with the following properties: function - 'GETHOST' subfunction - 'FCPDEVICES' Output: Request Handle updated with the results. Return code - 0:...
def getGeneralInfo(rh): """ Obtain general information about the host. Input: Request Handle with the following properties: function - 'GETHOST' subfunction - 'GENERAL' Output: Request Handle updated with the results. Return code - 0: ok Return code -...
def parseCmdline(rh): """ Parse the request command input. Input: Request Handle Output: Request Handle updated with parsed input. Return code - 0: ok, non-zero: error """ rh.printSysLog("Enter getHost.parseCmdline") rh.userid = '' if rh.totalParms >= 2: ...
def showInvLines(rh): """ Produce help output related to command synopsis Input: Request Handle """ if rh.subfunction != '': rh.printLn("N", "Usage:") rh.printLn("N", " python " + rh.cmdName + " GetHost " + "diskpoolnames") rh.printLn("N", " python " + rh.cmdName +...
def showOperandLines(rh): """ Produce help output related to operands. Input: Request Handle """ if rh.function == 'HELP': rh.printLn("N", " For the GetHost function:") else: rh.printLn("N", "Sub-Functions(s):") rh.printLn("N", " diskpoolnames - " + "Re...
def deleteMachine(rh): """ Delete a virtual machine from the user directory. Input: Request Handle with the following properties: function - 'DELETEVM' subfunction - 'DIRECTORY' userid - userid of the virtual machine to be deleted. Output: Request Ha...
def activate(rh): """ Activate a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'ON' userid - userid of the virtual machine parms['desiredState'] - Desired state. Optional, ...
def checkIsReachable(rh): """ Check if a virtual machine is reachable. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'ISREACHABLE' userid - userid of the virtual machine Output: Request Handle updated with th...
def deactivate(rh): """ Deactivate a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'OFF' userid - userid of the virtual machine parms['maxQueries'] - Maximum number of queries to issue. ...
def getStatus(rh): """ Get the power (logon/off) status of a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'STATUS' userid - userid of the virtual machine Output: Request Handle updated with ...
def parseCmdline(rh): """ Parse the request command input. Input: Request Handle Output: Request Handle updated with parsed input. Return code - 0: ok, non-zero: error """ rh.printSysLog("Enter powerVM.parseCmdline") if rh.totalParms >= 2: rh.userid = rh.requ...
def pause(rh): """ Pause a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'PAUSE' userid - userid of the virtual machine Output: Request Handle updated with the results. Return code - 0...
def reboot(rh): """ Reboot a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'REBOOT' userid - userid of the virtual machine parms['desiredState'] - Desired state. Optional, unless ...
def reset(rh): """ Reset a virtual machine. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'RESET' userid - userid of the virtual machine parms['maxQueries'] - Maximum number of queries to issue. ...
def softDeactivate(rh): """ Deactivate a virtual machine by first shutting down Linux and then log it off. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'SOFTOFF' userid - userid of the virtual machine parm...
def wait(rh): """ Wait for the virtual machine to go into the specified state. Input: Request Handle with the following properties: function - 'POWERVM' subfunction - 'WAIT' userid - userid of the virtual machine parms['desiredState'] - Desired state...
def call(self, func, *api_args, **api_kwargs): """Send API call to SDK server and return results""" if not isinstance(func, str) or (func == ''): msg = ('Invalid input for API name, should be a' 'string, type: %s specified.') % type(func) return self._construct...
def send_results(self, client, addr, results): """ send back results to client in the json format of: {'overallRC': x, 'modID': x, 'rc': x, 'rs': x, 'errmsg': 'msg', 'output': 'out'} """ json_results = json.dumps(results) json_results = json_results.encode() sen...
def serve_API(self, client, addr): """ Read client request and call target SDK API""" self.log_debug("(%s:%s) Handling new request from client." % (addr[0], addr[1])) results = None try: data = client.recv(4096) data = bytes.decode(data) ...
def dispatch(environ, start_response, mapper): """Find a matching route for the current request. :raises: 404(not found) if no match request 405(method not allowed) if route exist but method not provided. """ result = mapper.match(environ=environ) if result is None: ...
def handle_not_allowed(environ, start_response): """Return a 405 response when method is not allowed. If _methods are in routing_args, send an allow header listing the methods that are possible on the provided URL. """ _methods = util.wsgi_path_item(environ, '_methods') headers = {} if _met...
def make_map(declarations): """Process route declarations to create a Route Mapper.""" mapper = routes.Mapper() for route, methods in ROUTE_LIST: allowed_methods = [] for method, func in methods.items(): mapper.connect(route, action=func, conditions=dic...
def _offline_fcp_device(self, fcp, target_wwpn, target_lun, multipath): """rhel offline zfcp. sampe to all rhel distro.""" offline_dev = 'chccwdev -d %s' % fcp delete_records = self._delete_zfcp_config_records(fcp, target_wwpn, ...
def _delete_zfcp_config_records(self, fcp, target_wwpn, target_lun): """rhel""" device = '0.0.%s' % fcp data = {'wwpn': target_wwpn, 'lun': target_lun, 'device': device, 'zfcpConf': '/etc/zfcp.conf'} delete_records_cmd = ('sed -i -e ' '\"/%(d...