Skip to content

Commit f8d4dd2

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Command doc: snapshot"
2 parents c7d7866 + 460b530 commit f8d4dd2

3 files changed

Lines changed: 145 additions & 12 deletions

File tree

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
========
2+
snapshot
3+
========
4+
5+
Volume v1
6+
7+
snapshot create
8+
---------------
9+
10+
Create new snapshot
11+
12+
.. program:: snapshot create
13+
.. code:: bash
14+
15+
os snapshot create
16+
[--name <name>]
17+
[--description <description>]
18+
[--force]
19+
<volume>
20+
21+
.. option:: --name <name>
22+
23+
Name of the snapshot
24+
25+
.. option:: --description <description>
26+
27+
Description of the snapshot
28+
29+
.. option:: --force
30+
31+
Create a snapshot attached to an instance. Default is False
32+
33+
.. _snapshot_create-snapshot:
34+
.. describe:: <volume>
35+
36+
Volume to snapshot (name or ID)
37+
38+
snapshot delete
39+
---------------
40+
41+
Delete snapshot(s)
42+
43+
.. program:: snapshot delete
44+
.. code:: bash
45+
46+
os snapshot delete
47+
<snapshot> [<snapshot> ...]
48+
49+
.. _snapshot_delete-snapshot:
50+
.. describe:: <snapshot>
51+
52+
Snapshot(s) to delete (name or ID)
53+
54+
snapshot list
55+
-------------
56+
57+
List snapshots
58+
59+
.. program:: snapshot list
60+
.. code:: bash
61+
62+
os snapshot list
63+
64+
.. option:: --long
65+
66+
List additional fields in output
67+
68+
snapshot set
69+
------------
70+
71+
Set snapshot properties
72+
73+
.. program:: snapshot set
74+
.. code:: bash
75+
76+
os snapshot set
77+
[--name <name>]
78+
[--description <description>]
79+
[--property <key=value> [...] ]
80+
<snapshot>
81+
82+
.. _snapshot_restore-snapshot:
83+
.. option:: --name <name>
84+
85+
New snapshot name
86+
87+
.. option:: --description <description>
88+
89+
New snapshot description
90+
91+
.. option:: --property <key=value>
92+
93+
Property to add or modify for this snapshot (repeat option to set multiple properties)
94+
95+
.. describe:: <snapshot>
96+
97+
Snapshot to modify (name or ID)
98+
99+
snapshot show
100+
-------------
101+
102+
Display snapshot details
103+
104+
.. program:: snapshot show
105+
.. code:: bash
106+
107+
os snapshot show
108+
<snapshot>
109+
110+
.. _snapshot_show-snapshot:
111+
.. describe:: <snapshot>
112+
113+
Snapshot to display (name or ID)
114+
115+
snapshot unset
116+
--------------
117+
118+
Unset snapshot properties
119+
120+
.. program:: snapshot unset
121+
.. code:: bash
122+
123+
os snapshot unset
124+
[--property <key>]
125+
<snapshot>
126+
127+
.. option:: --property <key>
128+
129+
Property to remove from snapshot (repeat option to remove multiple properties)
130+
131+
.. describe:: <snapshot>
132+
133+
Snapshot to modify (name or ID)

‎doc/source/commands.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ referring to both Compute and Volume quotas.
110110
* ``server``: (**Compute**) virtual machine instance
111111
* ``server image``: (**Compute**) saved server disk image
112112
* ``service``: Identity - a cloud service
113-
* ``snapshot``: Volume - a point-in-time copy of a volume
113+
* ``snapshot``: (**Volume**) a point-in-time copy of a volume
114114
* ``token``: (**Identity**) a bearer token managed by Identity service
115115
* ``usage``: (**Compute**) display host resources being consumed
116116
* ``user``: (**Identity**) individual cloud resources users

‎openstackclient/volume/v1/snapshot.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
class CreateSnapshot(show.ShowOne):
31-
"""Create snapshot command"""
31+
"""Create new snapshot"""
3232

3333
log = logging.getLogger(__name__ + '.CreateSnapshot')
3434

@@ -37,7 +37,7 @@ def get_parser(self, prog_name):
3737
parser.add_argument(
3838
'volume',
3939
metavar='<volume>',
40-
help='The name or ID of the volume to snapshot',
40+
help='Volume to snapshot (name or ID)',
4141
)
4242
parser.add_argument(
4343
'--name',
@@ -104,7 +104,7 @@ def take_action(self, parsed_args):
104104

105105

106106
class ListSnapshot(lister.Lister):
107-
"""List snapshot command"""
107+
"""List snapshots"""
108108

109109
log = logging.getLogger(__name__ + '.ListSnapshot')
110110

@@ -167,7 +167,7 @@ def _format_volume_id(volume_id):
167167

168168

169169
class SetSnapshot(command.Command):
170-
"""Set snapshot command"""
170+
"""Set snapshot properties"""
171171

172172
log = logging.getLogger(__name__ + '.SetSnapshot')
173173

@@ -176,14 +176,14 @@ def get_parser(self, prog_name):
176176
parser.add_argument(
177177
'snapshot',
178178
metavar='<snapshot>',
179-
help='Name or ID of snapshot to change')
179+
help='Snapshot to modify (name or ID)')
180180
parser.add_argument(
181181
'--name',
182-
metavar='<snapshot-name>',
182+
metavar='<name>',
183183
help='New snapshot name')
184184
parser.add_argument(
185185
'--description',
186-
metavar='<snapshot-description>',
186+
metavar='<description>',
187187
help='New snapshot description')
188188
parser.add_argument(
189189
'--property',
@@ -219,7 +219,7 @@ def take_action(self, parsed_args):
219219

220220

221221
class ShowSnapshot(show.ShowOne):
222-
"""Show snapshot command"""
222+
"""Display snapshot details"""
223223

224224
log = logging.getLogger(__name__ + '.ShowSnapshot')
225225

@@ -228,7 +228,7 @@ def get_parser(self, prog_name):
228228
parser.add_argument(
229229
'snapshot',
230230
metavar='<snapshot>',
231-
help='Name or ID of snapshot to display')
231+
help='Snapshot to display (name or ID)')
232232
return parser
233233

234234
def take_action(self, parsed_args):
@@ -254,14 +254,14 @@ def get_parser(self, prog_name):
254254
parser.add_argument(
255255
'snapshot',
256256
metavar='<snapshot>',
257-
help='snapshot to change (name or ID)',
257+
help='Snapshot to modify (name or ID)',
258258
)
259259
parser.add_argument(
260260
'--property',
261261
metavar='<key>',
262262
action='append',
263263
default=[],
264-
help='Property key to remove from snapshot '
264+
help='Property to remove from snapshot '
265265
'(repeat to remove multiple values)',
266266
)
267267
return parser

0 commit comments

Comments
 (0)