Skip to content

Commit 16e17e1

Browse files
committed
#1322 add volume-set-note docs
1 parent c75e0a9 commit 16e17e1

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

SoftLayer/CLI/block/list.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def cli(env, sortby, columns, datacenter, username, storage_type):
7979
table = formatting.Table(columns.columns)
8080
table.sortby = sortby
8181

82-
reduce_notes(block_volumes)
82+
_reduce_notes(block_volumes)
8383

8484
for block_volume in block_volumes:
8585
table.add_row([value or formatting.blank()
@@ -88,7 +88,11 @@ def cli(env, sortby, columns, datacenter, username, storage_type):
8888
env.fout(table)
8989

9090

91-
def reduce_notes(block_volumes):
91+
def _reduce_notes(block_volumes):
92+
"""Reduces the size of the notes in a volume list.
93+
94+
:param block_volumes: An list of block volumes
95+
"""
9296
for block_volume in block_volumes:
9397
if len(block_volume.get('notes', '')) > DEFAULT_NOTES_SIZE:
9498
shortened_notes = block_volume['notes'][:DEFAULT_NOTES_SIZE]

SoftLayer/CLI/file/list.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def cli(env, sortby, columns, datacenter, username, storage_type):
7777
table = formatting.Table(columns.columns)
7878
table.sortby = sortby
7979

80-
reduce_notes(file_volumes)
80+
_reduce_notes(file_volumes)
8181

8282
for file_volume in file_volumes:
8383
table.add_row([value or formatting.blank()
@@ -86,7 +86,11 @@ def cli(env, sortby, columns, datacenter, username, storage_type):
8686
env.fout(table)
8787

8888

89-
def reduce_notes(file_volumes):
89+
def _reduce_notes(file_volumes):
90+
"""Reduces the size of the notes in a volume list.
91+
92+
:param file_volumes: An list of file volumes
93+
"""
9094
for file_volume in file_volumes:
9195
if len(file_volume.get('notes', '')) > DEFAULT_NOTES_SIZE:
9296
shortened_notes = file_volume['notes'][:DEFAULT_NOTES_SIZE]

docs/cli/block.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,7 @@ Block Commands
138138
.. click:: SoftLayer.CLI.block.convert:cli
139139
:prog: block volume-convert
140140
:show-nested:
141+
142+
.. click:: SoftLayer.CLI.block.set_note:cli
143+
:prog: block volume-set-note
144+
:show-nested:

docs/cli/file.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,8 @@ File Commands
117117

118118
.. click:: SoftLayer.CLI.file.convert:cli
119119
:prog: file volume-convert
120+
:show-nested:
121+
122+
.. click:: SoftLayer.CLI.file.set_note:cli
123+
:prog: file volume-set-note
120124
:show-nested:

0 commit comments

Comments
 (0)