Hello community,

here is the log from the commit of package linstor-client for openSUSE:Factory 
checked in at 2020-09-22 21:14:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linstor-client (Old)
 and      /work/SRC/openSUSE:Factory/.linstor-client.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linstor-client"

Tue Sep 22 21:14:27 2020 rev:2 rq:836004 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/linstor-client/linstor-client.changes    
2020-07-30 15:44:17.653749230 +0200
+++ /work/SRC/openSUSE:Factory/.linstor-client.new.4249/linstor-client.changes  
2020-09-22 21:15:07.864136749 +0200
@@ -1,0 +2,7 @@
+Tue Sep 22 07:28:50 UTC 2020 - nick wang <nw...@suse.com>
+
+- bsc#1176790, update to 1.3.0
+ * Added snapshot shipping list command
+ * correctly show inactive resources
+
+-------------------------------------------------------------------

Old:
----
  linstor-client-1.1.2.tar.gz

New:
----
  linstor-client-1.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linstor-client.spec ++++++
--- /var/tmp/diff_new_pack.rvrxQD/_old  2020-09-22 21:15:08.416137232 +0200
+++ /var/tmp/diff_new_pack.rvrxQD/_new  2020-09-22 21:15:08.420137235 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           linstor-client
-Version:        1.1.2
+Version:        1.3.0
 Release:        0
 Summary:        DRBD distributed resource management utility
 License:        GPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.rvrxQD/_old  2020-09-22 21:15:08.452137264 +0200
+++ /var/tmp/diff_new_pack.rvrxQD/_new  2020-09-22 21:15:08.452137264 +0200
@@ -5,10 +5,10 @@
     <param name="filename">linstor-client</param>
 <!--
     build service using release linstor-client atm.
-    <param name="version">1.1.2</param>
+    <param name="version">1.3.0</param>
     Need to use the corresponding linstor-api-py
 -->
-    <param name="versionformat">1.1.2+git.%h</param>
+    <param name="versionformat">1.3.0+git.%h</param>
     <param name="revision">master</param>
   </service>
 

++++++ linstor-client-1.1.2.tar.gz -> linstor-client-1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/Dockerfile 
new/linstor-client-1.3.0/Dockerfile
--- old/linstor-client-1.1.2/Dockerfile 2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/Dockerfile 2020-08-17 15:29:15.000000000 +0200
@@ -1,7 +1,7 @@
 FROM centos:centos7 as builder
 
-ENV LINSTOR_CLI_VERSION 1.1.2
-ENV PYTHON_LINSTOR_VERSION 1.1.2
+ENV LINSTOR_CLI_VERSION 1.3.0
+ENV PYTHON_LINSTOR_VERSION 1.3.0
 
 ENV LINSTOR_CLI_PKGNAME linstor-client
 ENV LINSTOR_CLI_TGZ ${LINSTOR_CLI_PKGNAME}-${LINSTOR_CLI_VERSION}.tar.gz
@@ -45,7 +45,7 @@
 MAINTAINER Roland Kammerer <roland.kamme...@linbit.com>
 
 # ENV can not be shared between builder and "main"
-ENV LINSTOR_CLI_VERSION 1.1.2
+ENV LINSTOR_CLI_VERSION 1.3.0
 ARG release=1
 
 LABEL name="linstor-client" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/Makefile 
new/linstor-client-1.3.0/Makefile
--- old/linstor-client-1.1.2/Makefile   2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/Makefile   2020-08-17 15:29:15.000000000 +0200
@@ -6,7 +6,11 @@
 
 U := $(shell $(PYTHON) ./setup.py versionup2date >/dev/null 2>&1; echo $$?;)
 TESTS = $(wildcard unit-tests/*_test.py)
-DOCKERREGISTRY = drbd.io
+DOCKERREGISTRY := drbd.io
+ARCH ?= amd64
+ifneq ($(strip $(ARCH)),)
+DOCKERREGISTRY := $(DOCKERREGISTRY)/$(ARCH)
+endif
 DOCKERREGISTRY_QUAY = quay.io
 DOCKERREGPATH = $(DOCKERREGISTRY)/linstor-client
 DOCKERREGPATH_QUAY = $(DOCKERREGISTRY_QUAY)/linbit/linstor-client
@@ -19,7 +23,7 @@
 doc:
        PYTHONPATH=$(LINSTORAPI):. $(PYTHON) setup.py build_man
 
-install: linstor_client/consts_githash.py
+install:
        $(PYTHON) setup.py install --record $(INSTALLFILES)
 
 uninstall:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/PKG-INFO 
new/linstor-client-1.3.0/PKG-INFO
--- old/linstor-client-1.1.2/PKG-INFO   2020-05-28 16:26:40.882590300 +0200
+++ new/linstor-client-1.3.0/PKG-INFO   2020-08-17 15:42:00.463261600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: linstor-client
-Version: 1.1.2
+Version: 1.3.0
 Summary: DRBD distributed resource management utility
 Home-page: https://www.linbit.com
 Author: Robert Altnoeder <robert.altnoe...@linbit.com>, Roland Kammerer 
<roland.kamme...@linbit.com>, Rene Peinthor <rene.peint...@linbit.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/commands/commands.py 
new/linstor-client-1.3.0/linstor_client/commands/commands.py
--- old/linstor-client-1.1.2/linstor_client/commands/commands.py        
2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/commands/commands.py        
2020-08-17 15:29:15.000000000 +0200
@@ -60,6 +60,7 @@
     SNAPSHOT = 'snapshot'
     DRBD_PROXY = 'drbd-proxy'
     PHYSICAL_STORAGE = 'physical-storage'
+    SOS_REPORT = 'sos-report'
 
     MainList = [
         CONTROLLER,
@@ -79,7 +80,8 @@
         VOLUME_DEF,
         SNAPSHOT,
         DRBD_PROXY,
-        PHYSICAL_STORAGE
+        PHYSICAL_STORAGE,
+        SOS_REPORT
     ]
     Hidden = [
         DMMIGRATE,
@@ -226,6 +228,30 @@
             LONG = "spawn-resources"
             SHORT = "spawn"
 
+        class Download(object):
+            LONG = "download"
+            SHORT = "dl"
+
+        class Activate(object):
+            LONG = "activate"
+            SHORT = "act"
+
+        class Deactivate(object):
+            LONG = "deactivate"
+            SHORT = "deact"
+
+        class Rollback(object):
+            LONG = "rollback"
+            SHORT = "rb"
+
+        class Ship(object):
+            LONG = "ship"
+            SHORT = "sh"
+
+        class ShipList(object):
+            LONG = "ship-list"
+            SHORT = "shl"
+
         @staticmethod
         def generate_desc(subcommands):
             """
@@ -377,9 +403,15 @@
         parser.add_argument('--aux', action="store_true", help="Property is an 
auxiliary user property.")
         if property_object:
             props = Commands.get_allowed_props(property_object)
+            help_list = []
+            for prop in props:
+                prop_help = "'" + prop['key'] + "': " + prop.get('info', 
'-').replace("%", "%%")
+                if 'values' in prop:
+                    prop_help += '; Allowed: ' + str(prop['values'])
+                help_list.append(prop_help)
             parser.add_argument(
                 'key',
-                help='\n'.join(["'" + x['key'] + "': " + 
x['info'].replace("%", "%%") for x in props if 'info' in x])
+                help='\n'.join(help_list)
             ).completer = Commands.get_allowed_prop_keys(property_object)
         else:
             parser.add_argument(
@@ -901,6 +933,7 @@
             nargs='+',
             help="Restrict to id's that begin with the given ones."
         )
+        c_list_error_reports.add_argument('-f', '--full', action="store_true", 
help='Show all error info fields')
         c_list_error_reports.set_defaults(func=self.cmd_list_error_reports)
 
         c_error_report = error_subp.add_parser(
@@ -913,6 +946,41 @@
 
         self.check_subcommands(error_subp, error_subcmds)
 
+        sos_subcommands = [
+            Commands.Subcommands.Create,
+            Commands.Subcommands.Download
+        ]
+        sos_parser = parser.add_parser(
+            Commands.SOS_REPORT,
+            aliases=["sos"],
+            formatter_class=argparse.RawTextHelpFormatter,
+            description="SOS report subcommands")
+
+        sos_subp = sos_parser.add_subparsers(
+            title="SOS report commands",
+            metavar="",
+            description=Commands.Subcommands.generate_desc(sos_subcommands)
+        )
+
+        c_sos_create = sos_subp.add_parser(
+            Commands.Subcommands.Create.LONG,
+            aliases=[Commands.Subcommands.Create.SHORT],
+            description='Create a sos report on the controller'
+        )
+        c_sos_create.add_argument('-s', '--since', help='Create sos-report 
with logs since n days. e.g. "3days"')
+        c_sos_create.set_defaults(func=self.cmd_sos_report_create)
+
+        c_sos_download = sos_subp.add_parser(
+            Commands.Subcommands.Download.LONG,
+            aliases=[Commands.Subcommands.Download.SHORT],
+            description='Create a sos report and downloads it'
+        )
+        c_sos_download.add_argument('-s', '--since', help='Create sos-report 
with logs since n days. e.g. "3days"')
+        c_sos_download.add_argument(
+            'path', nargs='?', help='Directory where to download the sos 
report')
+        c_sos_download.set_defaults(func=self.cmd_sos_report_download)
+        self.check_subcommands(sos_subp, sos_subcommands)
+
     @staticmethod
     def _summarize_api_call_responses(responses):
         return "; ".join([response.message for response in responses])
@@ -956,39 +1024,62 @@
 
     @classmethod
     def show_error_report_list(cls, args, lstmsg):
+        """
+
+        :param args:
+        :param list[linstor.responses.ErrorReport] lstmsg:
+        :return:
+        """
         tbl = linstor_client.Table(utf8=not args.no_utf8, colors=not 
args.no_color, pastable=args.pastable)
-        tbl.add_header(linstor_client.TableHeader("Nr.", 
alignment_text=linstor_client.TableHeader.ALIGN_RIGHT))
         tbl.add_header(linstor_client.TableHeader("Id"))
         tbl.add_header(linstor_client.TableHeader("Datetime"))
         tbl.add_header(linstor_client.TableHeader("Node"))
+        tbl.add_header(linstor_client.TableHeader("Exception"))
+        if args.full:
+            tbl.add_header(linstor_client.TableHeader("Location"))
+            tbl.add_header(linstor_client.TableHeader("Version"))
 
-        i = 1
         for error in lstmsg:
-            tbl.add_row([
-                str(i),
+            msg = error.exception_message if len(error.exception_message) < 60 
else error.exception_message[0:57]+'...'
+            row = [
                 error.id,
                 str(error.datetime)[:19],
-                error.node_names
-            ])
-            i += 1
+                (error.module[0] + '|' if error.module else "") + 
error.node_names,
+                error.exception + (": " + msg if msg else "")]
+            if args.full:
+                row += ["{f}:{l}".format(f=error.origin_file, 
l=error.origin_line) if error.origin_file else "",
+                        error.version]
+            tbl.add_row(row)
         tbl.show()
 
+    @staticmethod
+    def parse_time_str(timestr):
+        """
+        Parses a day and hour string to a datetime from the current time.
+        e.g.: `1d10h or 3h`
+        :param str timestr: string to parse
+        :return: datetime of the timestr
+        :rtype: datetime
+        """
+        m = re.match(r'(\d+\W*d)?(\d+\W*h)?', timestr)
+        if m:
+            since_dt = datetime.now()
+            if m.group(1):
+                since_dt -= timedelta(days=int(m.group(1)[:-1]))
+            if m.group(2):
+                since_dt -= timedelta(hours=int(m.group(2)[:-1]))
+            return since_dt
+        else:
+            raise LinstorClientError(
+                "Unable to parse since string: '{s_str}'. e.g.: 1d10h or 
3h'".format(s_str=timestr),
+                ExitCode.ARGPARSE_ERROR
+            )
+
     def cmd_list_error_reports(self, args):
         since = args.since
         since_dt = None
         if since:
-            m = re.match(r'(\d+\W*d)?(\d+\W*h)?', since)
-            if m:
-                since_dt = datetime.now()
-                if m.group(1):
-                    since_dt -= timedelta(days=int(m.group(1)[:-1]))
-                if m.group(2):
-                    since_dt -= timedelta(hours=int(m.group(2)[:-1]))
-            else:
-                raise LinstorClientError(
-                    "Unable to parse since string: '{s_str}'. e.g.: 1d10h or 
3h'".format(s_str=since),
-                    ExitCode.ARGPARSE_ERROR
-                )
+            since_dt = MiscCommands.parse_time_str(since)
 
         to_dt = None
         if args.to:
@@ -1005,3 +1096,16 @@
     def cmd_error_report(self, args):
         lstmsg = self._linstor.error_report_list(with_content=True, 
ids=args.report_id)
         return self.output_list(args, lstmsg, self.show_error_report, 
single_item=False)
+
+    def cmd_sos_report_create(self, args):
+        since_dt = None
+        if args.since:
+            since_dt = MiscCommands.parse_time_str(args.since)
+        replies = self.get_linstorapi().sos_report_create(since=since_dt)
+        return self.handle_replies(args, replies)
+
+    def cmd_sos_report_download(self, args):
+        since_dt = None
+        if args.since:
+            since_dt = MiscCommands.parse_time_str(args.since)
+        return self.handle_replies(args, 
self.get_linstorapi().sos_report_download(since=since_dt, to_file=args.path))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/commands/rsc_cmds.py 
new/linstor-client-1.3.0/linstor_client/commands/rsc_cmds.py
--- old/linstor-client-1.1.2/linstor_client/commands/rsc_cmds.py        
2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/commands/rsc_cmds.py        
2020-08-17 15:29:15.000000000 +0200
@@ -38,6 +38,7 @@
         linstor_client.TableHeader("Usage", Color.DARKGREEN),
         linstor_client.TableHeader("Conns", Color.DARKGREEN),
         linstor_client.TableHeader("State", Color.DARKGREEN, 
alignment_text=linstor_client.TableHeader.ALIGN_RIGHT),
+        linstor_client.TableHeader("CreatedOn")
     ]
 
     def __init__(self, state_service):
@@ -55,7 +56,9 @@
             Commands.Subcommands.ListProperties,
             Commands.Subcommands.DrbdPeerDeviceOptions,
             Commands.Subcommands.ToggleDisk,
-            Commands.Subcommands.CreateTransactional
+            Commands.Subcommands.CreateTransactional,
+            Commands.Subcommands.Activate,
+            Commands.Subcommands.Deactivate
         ]
 
         # Resource subcommands
@@ -100,6 +103,11 @@
             action="store_true",
             help='Mark this resource as drbd diskless'
         )
+        p_new_res.add_argument(
+            '--inactive',
+            action="store_true",
+            help="Marks the resource created as inactive"
+        )
         self.add_auto_select_argparse_arguments(p_new_res)
         p_new_res.add_argument(
             'node_name',
@@ -298,6 +306,35 @@
         ).completer = self.resource_dfn_completer
         p_toggle_disk.set_defaults(func=self.toggle_disk, parser=p_toggle_disk)
 
+        # activate/deactivate resource commands
+        p_activate = res_subp.add_parser(
+            Commands.Subcommands.Activate.LONG,
+            aliases=[Commands.Subcommands.Activate.SHORT],
+            description='Activate a resource.')
+        p_activate.add_argument(
+            'node_name',
+            type=str,
+            help='Node name of the resource').completer = self.node_completer
+        p_activate.add_argument(
+            'resource_name',
+            type=str,
+            help='Name of the resource').completer = 
self.resource_dfn_completer
+        p_activate.set_defaults(func=self.activate)
+
+        p_deactivate = res_subp.add_parser(
+            Commands.Subcommands.Deactivate.LONG,
+            aliases=[Commands.Subcommands.Deactivate.SHORT],
+            description='Deactivate a resource.')
+        p_deactivate.add_argument(
+            'node_name',
+            type=str,
+            help='Node name of the resource').completer = self.node_completer
+        p_deactivate.add_argument(
+            'resource_name',
+            type=str,
+            help='Name of the resource').completer = 
self.resource_dfn_completer
+        p_deactivate.set_defaults(func=self.deactivate)
+
         # resource creation transaction commands
         transactional_create_subcmds = [
             Commands.Subcommands.TransactionBegin,
@@ -394,7 +431,8 @@
                     args.node_id,
                     args.layer_list,
                     args.drbd_diskless,
-                    args.nvme_initiator
+                    args.nvme_initiator,
+                    not args.inactive
                 )
                 for node_name in args.node_name
             ]
@@ -433,7 +471,7 @@
         tbl.set_groupby(args.groupby if args.groupby else 
[ResourceCommands._resource_headers[0].name])
 
         for rsc in lstmsg.resources:
-            if not args.all and 'TIE_BREAKER' in rsc.flags:
+            if not args.all and apiconsts.FLAG_TIE_BREAKER in rsc.flags:
                 continue  # skip tie breaker resources
 
             rsc_dfn_port = ''
@@ -449,6 +487,8 @@
             if marked_delete:
                 rsc_state_color = Color.RED
                 rsc_state = "DELETING"
+            elif apiconsts.FLAG_RSC_INACTIVE in rsc.flags:
+                rsc_state = apiconsts.FLAG_RSC_INACTIVE
             elif rsc_state_obj:
                 if rsc_state_obj.in_use is not None:
                     if rsc_state_obj.in_use:
@@ -489,7 +529,8 @@
                     rsc_dfn_port,
                     tbl.color_cell(rsc_usage, rsc_usage_color) if 
rsc_usage_color else rsc_usage,
                     conns_col,
-                    tbl.color_cell(rsc_state, Color.RED if conns_col_entries 
else rsc_state_color)
+                    tbl.color_cell(rsc_state, Color.RED if conns_col_entries 
else rsc_state_color),
+                    str(rsc.create_datetime)[:19] if rsc.create_datetime else 
""
                 ])
         tbl.show()
 
@@ -573,3 +614,17 @@
         replies = 
self._linstor.resource_create(self._state_service.get_state().rscs, async_flag)
         self._state_service.pop_state()
         return self.handle_replies(args, replies)
+
+    def activate(self, args):
+        replies = self.get_linstorapi().resource_activate(
+            node_name=args.node_name,
+            rsc_name=args.resource_name
+        )
+        return self.handle_replies(args, replies)
+
+    def deactivate(self, args):
+        replies = self.get_linstorapi().resource_deactivate(
+            node_name=args.node_name,
+            rsc_name=args.resource_name
+        )
+        return self.handle_replies(args, replies)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/commands/rsc_dfn_cmds.py 
new/linstor-client-1.3.0/linstor_client/commands/rsc_dfn_cmds.py
--- old/linstor-client-1.1.2/linstor_client/commands/rsc_dfn_cmds.py    
2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/commands/rsc_dfn_cmds.py    
2020-08-17 15:29:15.000000000 +0200
@@ -88,6 +88,9 @@
             description='Modifies a Linstor resource definition')
         p_mod_res_dfn.add_argument('--peer-slots', type=rangecheck(1, 31), 
help='(DRBD) peer slots for new resources')
         p_mod_res_dfn.add_argument(
+            '--resource-group',
+            help='Change resource group to the given one.').completer = 
self.resource_grp_completer
+        p_mod_res_dfn.add_argument(
             'name',
             help='Name of the resource definition').completer = 
self.resource_dfn_completer
         p_mod_res_dfn.set_defaults(func=self.modify)
@@ -201,7 +204,8 @@
             args.name,
             {},
             [],
-            args.peer_slots
+            args.peer_slots,
+            resource_group=args.resource_group
         )
         return self.handle_replies(args, replies)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/commands/snapshot_cmds.py 
new/linstor-client-1.3.0/linstor_client/commands/snapshot_cmds.py
--- old/linstor-client-1.1.2/linstor_client/commands/snapshot_cmds.py   
2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/commands/snapshot_cmds.py   
2020-08-17 15:29:15.000000000 +0200
@@ -5,13 +5,17 @@
 from linstor_client.consts import Color
 from linstor.sharedconsts import FLAG_DELETE, FLAG_SUCCESSFUL, 
FLAG_FAILED_DEPLOYMENT, FLAG_FAILED_DISCONNECT
 from linstor_client.utils import Output
-from linstor import SizeCalc
+from linstor import SizeCalc, consts
 
 
 class SnapshotCommands(Commands):
-    class Rollback(object):
-        LONG = "rollback"
-        SHORT = "rb"
+    _shipping_headers = [
+        linstor_client.TableHeader("ResName"),
+        linstor_client.TableHeader("SnapName"),
+        linstor_client.TableHeader("FromNode"),
+        linstor_client.TableHeader("ToNode"),
+        linstor_client.TableHeader("Status", Color.DARKGREEN, 
alignment_text=linstor_client.TableHeader.ALIGN_RIGHT)
+    ]
 
     def __init__(self):
         super(SnapshotCommands, self).__init__()
@@ -21,9 +25,11 @@
             Commands.Subcommands.Create,
             Commands.Subcommands.List,
             Commands.Subcommands.Delete,
-            self.Rollback,
+            Commands.Subcommands.Rollback,
             Commands.Subcommands.Resource,
-            Commands.Subcommands.VolumeDefinition
+            Commands.Subcommands.VolumeDefinition,
+            Commands.Subcommands.Ship,
+            Commands.Subcommands.ShipList
         ]
 
         # Snapshot subcommands
@@ -81,10 +87,59 @@
             help='Name of the snapshot local to the resource definition')
         p_delete_snapshot.set_defaults(func=self.delete)
 
+        p_ship = snapshot_subp.add_parser(
+            Commands.Subcommands.Ship.LONG,
+            aliases=[Commands.Subcommands.Ship.SHORT],
+            description='Ship a snapshot to another node.')
+        p_ship.add_argument(
+            '--from-node',
+            required=True,
+            type=str,
+            help='Source node name').completer = self.node_completer
+        p_ship.add_argument(
+            '--to-node',
+            required=True,
+            type=str,
+            help='Destination node name').completer = self.node_completer
+        p_ship.add_argument(
+            '--resource',
+            required=True,
+            type=str,
+            help='Name of the resource to ship').completer = 
self.resource_dfn_completer
+        p_ship.set_defaults(func=self.ship)
+
+        p_ship_list = snapshot_subp.add_parser(
+            Commands.Subcommands.ShipList.LONG,
+            aliases=[Commands.Subcommands.ShipList.SHORT],
+            description='List overview over snapshot shippings')
+        p_ship_list.add_argument('-p', '--pastable', action="store_true", 
help='Generate pastable output')
+        p_ship_list.add_argument(
+            '-r', '--resources',
+            nargs='+',
+            type=str,
+            help='Filter by list of resources').completer = 
self.resource_completer
+        p_ship_list.add_argument(
+            '-n', '--nodes',
+            nargs='+',
+            type=str,
+            help='Filter by list of nodes').completer = self.node_completer
+        p_ship_list.add_argument(
+            '-s', '--snapshots',
+            nargs='+',
+            type=str,
+            help='Filter by list of snapshots').completer = self.node_completer
+        p_ship_list.add_argument(
+            '--status',
+            nargs='+',
+            choices=[x.value for x in consts.SnapshotShipStatus],
+            type=str,
+            help='Filter by list of statuses').completer = self.node_completer
+        p_ship_list.set_defaults(func=self.shiplist)
+
         # roll back to snapshot
         p_rollback_snapshot = snapshot_subp.add_parser(
-            self.Rollback.LONG,
-            aliases=[self.Rollback.SHORT],
+            Commands.Subcommands.Rollback.LONG,
+            aliases=[Commands.Subcommands.Rollback.SHORT],
             description='Rolls resource data back to snapshot state. '
                         'The resource must not be in use. '
                         'The snapshot will not be removed and can be used for 
subsequent rollbacks. '
@@ -241,6 +296,7 @@
         tbl.add_column("SnapshotName")
         tbl.add_column("NodeNames")
         tbl.add_column("Volumes")
+        tbl.add_column("CreatedOn")
         tbl.add_column("State", color=Output.color(Color.DARKGREEN, 
args.no_color))
         for snapshot_dfn in lstmsg.snapshots:
             if FLAG_DELETE in snapshot_dfn.flags:
@@ -254,6 +310,10 @@
             else:
                 state_cell = tbl.color_cell("Incomplete", Color.DARKBLUE)
 
+            snapshot_date = ""
+            if snapshot_dfn.snapshots and 
snapshot_dfn.snapshots[0].create_datetime:
+                snapshot_date = 
str(snapshot_dfn.snapshots[0].create_datetime)[:19]
+
             tbl.add_row([
                 snapshot_dfn.resource_name,
                 snapshot_dfn.name,
@@ -261,6 +321,7 @@
                 ", ".join([
                     str(snapshot_vlm_dfn.number) + ": " + 
SizeCalc.approximate_size_string(snapshot_vlm_dfn.size)
                     for snapshot_vlm_dfn in 
snapshot_dfn.snapshot_volume_definitions]),
+                snapshot_date,
                 state_cell
             ])
         tbl.show()
@@ -269,3 +330,38 @@
         lstmsg = self._linstor.snapshot_dfn_list(filter_by_nodes=args.nodes, 
filter_by_resources=args.resources)
 
         return self.output_list(args, lstmsg, self.show)
+
+    def ship(self, args):
+        replies = self.get_linstorapi().snapshot_ship(
+            rsc_name=args.resource,
+            from_node=args.from_node,
+            to_node=args.to_node)
+        return self.handle_replies(args, replies)
+
+    def show_ship_list(self, args, shipping_resp):
+        """
+
+        :param args:
+        :param shipping_resp: ShippingResponse
+        :return:
+        """
+        tbl = linstor_client.Table(utf8=not args.no_utf8, colors=not 
args.no_color, pastable=args.pastable)
+        tbl.add_headers(self._shipping_headers)
+        for shipping in shipping_resp.shippings:
+            tbl.add_row([
+                shipping.snapshot_dfn.resource_name,
+                shipping.snapshot_dfn.snapshot_name,
+                shipping.from_node_name,
+                shipping.to_node_name,
+                tbl.color_cell(shipping.status.value,
+                               None if shipping.status == 
consts.SnapshotShipStatus.COMPLETE else Color.YELLOW)
+            ])
+        tbl.show()
+
+    def shiplist(self, args):
+        lstmsg = self.get_linstorapi().snapshot_shipping_list(
+            filter_by_nodes=args.nodes,
+            filter_by_resources=args.resources,
+            filter_by_snapshots=args.snapshots,
+            filter_by_status=args.status)
+        return self.output_list(args, lstmsg, self.show_ship_list)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/commands/vlm_cmds.py 
new/linstor-client-1.3.0/linstor_client/commands/vlm_cmds.py
--- old/linstor-client-1.1.2/linstor_client/commands/vlm_cmds.py        
2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/commands/vlm_cmds.py        
2020-08-17 15:29:15.000000000 +0200
@@ -169,9 +169,12 @@
 
         reports = []
         for rsc in lstmsg.resources:
-            if not args.all and 'TIE_BREAKER' in rsc.flags:
+            if not args.all and apiconsts.FLAG_TIE_BREAKER in rsc.flags:
                 continue  # skip tie breaker resources
 
+            if apiconsts.FLAG_RSC_INACTIVE in rsc.flags:
+                continue  # do not show non existing volumes for inactive 
resources
+
             rsc_state = rsc_state_lkup.get(rsc.node_name + rsc.name)
             rsc_usage = ""
             if rsc_state and rsc_state.in_use is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/linstor_client/consts.py 
new/linstor-client-1.3.0/linstor_client/consts.py
--- old/linstor-client-1.1.2/linstor_client/consts.py   2020-05-28 
16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/consts.py   2020-08-17 
15:29:15.000000000 +0200
@@ -21,7 +21,7 @@
 Global constants for linstor
 """
 
-VERSION = "1.1.2"
+VERSION = "1.3.0"
 
 try:
     from linstor.consts_githash import GITHASH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client/consts_githash.py 
new/linstor-client-1.3.0/linstor_client/consts_githash.py
--- old/linstor-client-1.1.2/linstor_client/consts_githash.py   2020-05-28 
16:26:37.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client/consts_githash.py   2020-08-17 
15:41:57.000000000 +0200
@@ -1 +1 @@
-GITHASH = 'GIT-hash: 819b79f4aa1fc396acf8072ab4264d685ab4bcba'
+GITHASH = 'GIT-hash: 32bff01ed9ef35dd1e333974eb6921c0d3a9366e'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client.egg-info/PKG-INFO 
new/linstor-client-1.3.0/linstor_client.egg-info/PKG-INFO
--- old/linstor-client-1.1.2/linstor_client.egg-info/PKG-INFO   2020-05-28 
16:26:40.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client.egg-info/PKG-INFO   2020-08-17 
15:42:00.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: linstor-client
-Version: 1.1.2
+Version: 1.3.0
 Summary: DRBD distributed resource management utility
 Home-page: https://www.linbit.com
 Author: Robert Altnoeder <robert.altnoe...@linbit.com>, Roland Kammerer 
<roland.kamme...@linbit.com>, Rene Peinthor <rene.peint...@linbit.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client.egg-info/SOURCES.txt 
new/linstor-client-1.3.0/linstor_client.egg-info/SOURCES.txt
--- old/linstor-client-1.1.2/linstor_client.egg-info/SOURCES.txt        
2020-05-28 16:26:40.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client.egg-info/SOURCES.txt        
2020-08-17 15:42:00.000000000 +0200
@@ -62,6 +62,7 @@
 man-pages/linstor-resource-group.8.gz
 man-pages/linstor-resource.8.gz
 man-pages/linstor-snapshot.8.gz
+man-pages/linstor-sos-report.8.gz
 man-pages/linstor-storage-pool.8.gz
 man-pages/linstor-volume-definition.8.gz
 man-pages/linstor-volume-group.8.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/linstor-client-1.1.2/linstor_client.egg-info/requires.txt 
new/linstor-client-1.3.0/linstor_client.egg-info/requires.txt
--- old/linstor-client-1.1.2/linstor_client.egg-info/requires.txt       
2020-05-28 16:26:40.000000000 +0200
+++ new/linstor-client-1.3.0/linstor_client.egg-info/requires.txt       
2020-08-17 15:42:00.000000000 +0200
@@ -1 +1 @@
-python-linstor>=1.1.2
+python-linstor>=1.3.0
Binary files old/linstor-client-1.1.2/man-pages/linstor-controller.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-controller.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-dm-migrate.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-dm-migrate.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-drbd-proxy.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-drbd-proxy.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-encryption.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-encryption.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-error-reports.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-error-reports.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-exit.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-exit.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-gen-zsh-completer.8.gz 
and new/linstor-client-1.3.0/man-pages/linstor-gen-zsh-completer.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-help.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-help.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-interactive.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-interactive.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-list-commands.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-list-commands.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-node.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-node.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-physical-storage.8.gz 
and new/linstor-client-1.3.0/man-pages/linstor-physical-storage.8.gz differ
Binary files 
old/linstor-client-1.1.2/man-pages/linstor-resource-connection.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-resource-connection.8.gz differ
Binary files 
old/linstor-client-1.1.2/man-pages/linstor-resource-definition.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-resource-definition.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-resource-group.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-resource-group.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-resource.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-resource.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-snapshot.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-snapshot.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-sos-report.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-sos-report.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-storage-pool.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-storage-pool.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-volume-definition.8.gz 
and new/linstor-client-1.3.0/man-pages/linstor-volume-definition.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-volume-group.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-volume-group.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor-volume.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor-volume.8.gz differ
Binary files old/linstor-client-1.1.2/man-pages/linstor.8.gz and 
new/linstor-client-1.3.0/man-pages/linstor.8.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/man-pages/linstor.xml 
new/linstor-client-1.3.0/man-pages/linstor.xml
--- old/linstor-client-1.1.2/man-pages/linstor.xml      2020-05-28 
16:26:38.000000000 +0200
+++ new/linstor-client-1.3.0/man-pages/linstor.xml      2020-08-17 
15:41:57.000000000 +0200
@@ -378,6 +378,24 @@
                 <varlistentry>
                   <term>
                       <command moreinfo="none">linstor</command>
+                      <arg choice="plain" rep="norepeat">sos-report
+                      </arg>
+                  </term>
+                  <listitem>
+                    <para>
+                       SOS report subcommands
+                    </para>
+                    <para>For furter information see
+                        <citerefentry>
+                        <refentrytitle>linstor-sos-report</refentrytitle>
+                        <manvolnum>8</manvolnum></citerefentry>
+                    </para>
+                  </listitem>
+                </varlistentry>
+                
+                <varlistentry>
+                  <term>
+                      <command moreinfo="none">linstor</command>
                       <arg choice="plain" rep="norepeat">storage-pool
                       </arg>
                   </term>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/setup.cfg 
new/linstor-client-1.3.0/setup.cfg
--- old/linstor-client-1.1.2/setup.cfg  2020-05-28 16:26:40.882590300 +0200
+++ new/linstor-client-1.3.0/setup.cfg  2020-08-17 15:42:00.463261600 +0200
@@ -6,7 +6,7 @@
 build-requires = 
        python3-setuptools
 requires = 
-       python-linstor >= 1.1.2
+       python-linstor >= 1.3.0
 
 [egg_info]
 tag_build = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/setup.cfg.py2 
new/linstor-client-1.3.0/setup.cfg.py2
--- old/linstor-client-1.1.2/setup.cfg.py2      2020-05-28 16:25:27.000000000 
+0200
+++ new/linstor-client-1.3.0/setup.cfg.py2      2020-08-17 15:29:15.000000000 
+0200
@@ -6,4 +6,4 @@
 build-requires =
   python2-setuptools
 requires =
-  python-linstor >= 1.1.2
+  python-linstor >= 1.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linstor-client-1.1.2/setup.py 
new/linstor-client-1.3.0/setup.py
--- old/linstor-client-1.1.2/setup.py   2020-05-28 16:25:27.000000000 +0200
+++ new/linstor-client-1.3.0/setup.py   2020-08-17 15:29:15.000000000 +0200
@@ -197,7 +197,7 @@
         "linstor_client.commands"
     ],
     install_requires=[
-        "python-linstor>=1.1.2"
+        "python-linstor>=1.3.0"
     ],
     py_modules=["linstor_client_main"],
     scripts=["scripts/linstor"],


Reply via email to