Exemplo n.º 1
0
 def _restore(self, nvmf_subsystems):
     # Dump updated JSON dict to append new subsystem
     with tempfile.NamedTemporaryFile(mode='w') as tmp_fd:
         tmp_fd.write(json.dumps(nvmf_subsystems))
         tmp_fd.flush()
         try:
             out, err = nvmcli.restore(tmp_fd.name)
         except putils.ProcessExecutionError:
             with excutils.save_and_reraise_exception():
                 LOG.exception('Error from nvmetcli restore')
Exemplo n.º 2
0
 def _restore(self, nvmf_subsystems):
     # Dump updated JSON dict to append new subsystem
     with tempfile.NamedTemporaryFile() as tmp_fd:
         tmp_fd.write(json.dumps(nvmf_subsystems))
         tmp_fd.flush()
         try:
             out, err = nvmcli.restore(tmp_fd.name)
         except putils.ProcessExecutionError:
             with excutils.save_and_reraise_exception():
                 LOG.exception('Error from nvmetcli restore')