Пример #1
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command, pparams,
                                             kparams)
     except Exception as msg:
         self.shell.log.error(str(msg))
         pass
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
Пример #2
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command,
                                             pparams, kparams)
     except Exception as e:
         raise e
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
     finally:
         if command in ["create", "delete", "delete_all", "add_initiator",
                        "allow_any_host", "split_bdev", "add_lun",
                        "add_pg_ig_maps", "remove_target", "add_secret",
                        "destruct_split_bdev", "delete_pmem_pool",
                        "create_pmem_pool", "delete_secret_all",
                        "delete_initiator", "set_auth", "delete_secret",
                        "delete_pg_ig_maps"]:
             self.get_root().refresh()
             self.refresh_node()
Пример #3
0
 def execute_command(self, command, pparams=[], kparams={}):
     try:
         result = ConfigNode.execute_command(self, command, pparams,
                                             kparams)
     except Exception as e:
         raise e
     else:
         self.shell.log.debug("Command %s succeeded." % command)
         return result
     finally:
         if self.shell.interactive and\
             command in ["create", "delete", "delete_all", "add_initiator",
                         "allow_any_host", "bdev_split_create", "add_lun",
                         "iscsi_target_node_add_pg_ig_maps", "remove_target", "add_secret",
                         "bdev_split_delete", "bdev_pmem_delete_pool",
                         "bdev_pmem_create_pool", "delete_secret_all",
                         "delete_initiator", "set_auth", "delete_secret",
                         "iscsi_target_node_remove_pg_ig_maps", "load_config",
                         "load_subsystem_config"]:
             self.get_root().refresh()
             self.refresh_node()