232 lines
8.7 KiB
Diff
232 lines
8.7 KiB
Diff
From d395fbf4c1cb2289cb512dd255b420b8b1cf7971 Mon Sep 17 00:00:00 2001
|
|
From: Jan Tulak <jtulak@redhat.com>
|
|
Date: Fri, 10 Aug 2018 16:43:45 +0200
|
|
Subject: [PATCH 1/2] Remove info command for RHEL
|
|
|
|
Signed-off-by: Jan Tulak <jtulak@redhat.com>
|
|
---
|
|
README | 9 ---------
|
|
doc/generate_usage_includes.py | 10 ----------
|
|
doc/src/commands/index.rst | 1 -
|
|
doc/src/commands/info.rst | 8 --------
|
|
doc/src/commands/info.txt | 7 -------
|
|
man8/ssm.8 | 20 +-------------------
|
|
ssmlib/main.py | 32 --------------------------------
|
|
7 files changed, 1 insertion(+), 86 deletions(-)
|
|
delete mode 100644 doc/src/commands/info.rst
|
|
delete mode 100644 doc/src/commands/info.txt
|
|
|
|
diff --git a/README b/README
|
|
index fe16990..efce489 100644
|
|
--- a/README
|
|
+++ b/README
|
|
@@ -148,15 +148,6 @@ The following sections can be specified:
|
|
Info command
|
|
************
|
|
|
|
-**EXPERIMENTAL** This feature is currently experimental. The output
|
|
-format can change and fields can be added or removed.
|
|
-
|
|
-Show detailed information about all detected devices, pools, volumes
|
|
-and snapshots found on the system. The **info** command can be used
|
|
-either alone to show all available items, or you can specify a device,
|
|
-pool, or any other identifier to see information about the specific
|
|
-item.
|
|
-
|
|
|
|
Remove command
|
|
**************
|
|
diff --git a/doc/generate_usage_includes.py b/doc/generate_usage_includes.py
|
|
index d7695f8..e694722 100755
|
|
--- a/doc/generate_usage_includes.py
|
|
+++ b/doc/generate_usage_includes.py
|
|
@@ -12,7 +12,6 @@ SYNOPSIS_INC = "src/synopsis.inc"
|
|
OPTIONS_DIR = "src/options/"
|
|
SSM_OPTIONS_INC = OPTIONS_DIR + "ssm_options.inc"
|
|
CREATE_OPTIONS_INC = OPTIONS_DIR + "create_options.inc"
|
|
-INFO_OPTIONS_INC = OPTIONS_DIR + "info_options.inc"
|
|
LIST_OPTIONS_INC = OPTIONS_DIR + "list_options.inc"
|
|
REMOVE_OPTIONS_INC = OPTIONS_DIR + "remove_options.inc"
|
|
RESIZE_OPTIONS_INC = OPTIONS_DIR + "resize_options.inc"
|
|
@@ -24,7 +23,6 @@ MIGRATE_OPTIONS_INC = OPTIONS_DIR + "migrate_options.inc"
|
|
|
|
SSM_USAGE_INC = OPTIONS_DIR + "ssm_usage.inc"
|
|
CREATE_USAGE_INC = OPTIONS_DIR + "create_usage.inc"
|
|
-INFO_USAGE_INC = OPTIONS_DIR + "info_usage.inc"
|
|
LIST_USAGE_INC = OPTIONS_DIR + "list_usage.inc"
|
|
REMOVE_USAGE_INC = OPTIONS_DIR + "remove_usage.inc"
|
|
RESIZE_USAGE_INC = OPTIONS_DIR + "resize_usage.inc"
|
|
@@ -68,10 +66,6 @@ class GenerateIncludes(object):
|
|
message = self.format_synopsis(self.ssm_parser.parser_create)
|
|
self._write_message(message, CREATE_USAGE_INC)
|
|
|
|
- def write_info_usage(self):
|
|
- message = self.format_synopsis(self.ssm_parser.parser_info)
|
|
- self._write_message(message, INFO_USAGE_INC)
|
|
-
|
|
def write_list_usage(self):
|
|
message = self.format_synopsis(self.ssm_parser.parser_list)
|
|
self._write_message(message, LIST_USAGE_INC)
|
|
@@ -107,7 +101,6 @@ class GenerateIncludes(object):
|
|
def write_usage(self):
|
|
self.write_ssm_usage()
|
|
self.write_create_usage()
|
|
- self.write_info_usage()
|
|
self.write_list_usage()
|
|
self.write_remove_usage()
|
|
self.write_resize_usage()
|
|
@@ -137,9 +130,6 @@ class GenerateIncludes(object):
|
|
message = self._format_options(self.ssm_parser.parser_create)
|
|
self._write_message(message, CREATE_OPTIONS_INC)
|
|
|
|
- message = self._format_options(self.ssm_parser.parser_info)
|
|
- self._write_message(message, INFO_OPTIONS_INC)
|
|
-
|
|
message = self._format_options(self.ssm_parser.parser_list)
|
|
self._write_message(message, LIST_OPTIONS_INC)
|
|
|
|
diff --git a/doc/src/commands/index.rst b/doc/src/commands/index.rst
|
|
index 85ee495..d3f0a0f 100644
|
|
--- a/doc/src/commands/index.rst
|
|
+++ b/doc/src/commands/index.rst
|
|
@@ -7,7 +7,6 @@ System Storage Manager Commands
|
|
|
|
commands_introduction
|
|
create
|
|
- info
|
|
list
|
|
remove
|
|
resize
|
|
diff --git a/doc/src/commands/info.rst b/doc/src/commands/info.rst
|
|
deleted file mode 100644
|
|
index d2917ef..0000000
|
|
--- a/doc/src/commands/info.rst
|
|
+++ /dev/null
|
|
@@ -1,8 +0,0 @@
|
|
-Info command
|
|
-============
|
|
-
|
|
-.. include:: ../options/info_usage.inc
|
|
-
|
|
-.. include:: info.txt
|
|
-
|
|
-.. include:: ../options/info_options.inc
|
|
\ No newline at end of file
|
|
diff --git a/doc/src/commands/info.txt b/doc/src/commands/info.txt
|
|
deleted file mode 100644
|
|
index 7fadda0..0000000
|
|
--- a/doc/src/commands/info.txt
|
|
+++ /dev/null
|
|
@@ -1,7 +0,0 @@
|
|
-**EXPERIMENTAL** This feature is currently experimental. The output format can
|
|
-change and fields can be added or removed.
|
|
-
|
|
-Show detailed information about all detected devices, pools, volumes and
|
|
-snapshots found on the system. The **info** command can be used either alone
|
|
-to show all available items, or you can specify a device, pool, or any other
|
|
-identifier to see information about the specific item.
|
|
\ No newline at end of file
|
|
diff --git a/man8/ssm.8 b/man8/ssm.8
|
|
index c1de972..d421814 100644
|
|
--- a/man8/ssm.8
|
|
+++ b/man8/ssm.8
|
|
@@ -59,14 +59,12 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
..
|
|
.SH SYNOPSIS
|
|
.sp
|
|
-\fBssm\fP [\fB\-h\fP] [\fB\-\-version\fP] [\fB\-v\fP] [\fB\-f\fP] [\fB\-b\fP BACKEND] [\fB\-n\fP] {check,resize,create,list,info,add,remove,snapshot,mount,migrate} ...
|
|
+\fBssm\fP [\fB\-h\fP] [\fB\-\-version\fP] [\fB\-v\fP] [\fB\-f\fP] [\fB\-b\fP BACKEND] [\fB\-n\fP] {check,resize,create,list,add,remove,snapshot,mount,migrate} ...
|
|
.sp
|
|
\fBssm\fP \fBcreate\fP [\fB\-h\fP] [\fB\-s\fP SIZE] [\fB\-n\fP NAME] [\fB\-\-fstype\fP FSTYPE] [\fB\-r\fP LEVEL] [\fB\-I\fP STRIPESIZE] [\fB\-i\fP STRIPES] [\fB\-p\fP POOL] [\fB\-e\fP [{luks,plain}]] [\fB\-o\fP MNT_OPTIONS] [\fB\-v\fP VIRTUAL_SIZE] [\fBdevice\fP [\fBdevice\fP ...]] [mount]
|
|
.sp
|
|
\fBssm\fP \fBlist\fP [\fB\-h\fP] [{volumes,vol,dev,devices,pool,pools,fs,filesystems,snap,snapshots}]
|
|
.sp
|
|
-\fBssm\fP \fBinfo\fP [\fB\-h\fP] [item]
|
|
-.sp
|
|
\fBssm\fP \fBremove\fP [\fB\-h\fP] [\fB\-a\fP] [\fBitems\fP [\fBitems\fP ...]]
|
|
.sp
|
|
\fBssm\fP \fBresize\fP [\fB\-h\fP] [\fB\-s\fP SIZE] \fBvolume\fP [\fBdevice\fP [\fBdevice\fP ...]]
|
|
@@ -243,22 +241,6 @@ volume. A size suffix K|k, M|m, G|g, T|t, P|p, E|e can
|
|
be used to define \(aqpower of two\(aq units. If no unit is
|
|
provided, it defaults to kilobytes.
|
|
.UNINDENT
|
|
-.SS Info command
|
|
-.sp
|
|
-\fBssm\fP \fBinfo\fP [\fB\-h\fP] [item]
|
|
-.sp
|
|
-\fBEXPERIMENTAL\fP This feature is currently experimental. The output format can
|
|
-change and fields can be added or removed.
|
|
-.sp
|
|
-Show detailed information about all detected devices, pools, volumes and
|
|
-snapshots found on the system. The \fBinfo\fP command can be used either alone
|
|
-to show all available items, or you can specify a device, pool, or any other
|
|
-identifier to see information about the specific item.
|
|
-.INDENT 0.0
|
|
-.TP
|
|
-.B \-h\fP,\fB \-\-help
|
|
-show this help message and exit
|
|
-.UNINDENT
|
|
.SS List command
|
|
.sp
|
|
\fBssm\fP \fBlist\fP [\fB\-h\fP] [{volumes,vol,dev,devices,pool,pools,fs,filesystems,snap,snapshots}]
|
|
diff --git a/ssmlib/main.py b/ssmlib/main.py
|
|
index 9bbffd0..1e323df 100644
|
|
--- a/ssmlib/main.py
|
|
+++ b/ssmlib/main.py
|
|
@@ -1976,26 +1976,6 @@ class StorageHandle(object):
|
|
elif args.type in ['snap', 'snapshots']:
|
|
self.snap.psummary()
|
|
|
|
- def info(self, args):
|
|
- """
|
|
- Show a detailed info about an object
|
|
- """
|
|
- sources = [self.pool, self.dev, self.vol, self.snap]
|
|
- create_graph(*sources)
|
|
- print("EXPERIMENTAL FEATURE (The format can yet change)\n")
|
|
-
|
|
- if not args.item:
|
|
- for source in sources:
|
|
- source.pinfo()
|
|
- else:
|
|
- found = False
|
|
- for source in sources:
|
|
- found |= source.pinfo(item=args.item)
|
|
- if not found:
|
|
- err = "The item '%s' was not found." % args.item
|
|
- raise argparse.ArgumentTypeError(err)
|
|
-
|
|
-
|
|
def add(self, args, skip_check=False):
|
|
"""
|
|
Add devices into the pool
|
|
@@ -2529,7 +2509,6 @@ class SsmParser(object):
|
|
self.parser_resize = self._get_parser_resize()
|
|
self.parser_create = self._get_parser_create()
|
|
self.parser_list = self._get_parser_list()
|
|
- self.parser_info = self._get_parser_info()
|
|
self.parser_add = self._get_parser_add()
|
|
self.parser_remove = self._get_parser_remove()
|
|
self.parser_snapshot = self._get_parser_snapshot()
|
|
@@ -2707,17 +2686,6 @@ class SsmParser(object):
|
|
parser_list.set_defaults(func=self.storage.list)
|
|
return parser_list
|
|
|
|
- def _get_parser_info(self):
|
|
- """
|
|
- Info command
|
|
- """
|
|
- parser_info = self.subcommands.add_parser("info",
|
|
- help='''Show detailed information about
|
|
- an object. EXPERIMENTAL''')
|
|
- parser_info.add_argument('item', nargs='?')
|
|
- parser_info.set_defaults(func=self.storage.info)
|
|
- return parser_info
|
|
-
|
|
def _get_parser_add(self):
|
|
"""
|
|
Add command
|
|
--
|
|
2.16.2
|
|
|