Skip to content

Commit a6d69b5

Browse files
caberoscaberos
authored andcommitted
update the branch
2 parents 1f807ad + 182c390 commit a6d69b5

File tree

20 files changed

+96
-18
lines changed

20 files changed

+96
-18
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Get status for split or move completed percentage of a given block duplicate volume."""
2+
# :license: MIT, see LICENSE for more details.
3+
4+
import click
5+
import SoftLayer
6+
from SoftLayer.CLI import environment
7+
from SoftLayer.CLI import formatting
8+
9+
10+
@click.command(cls=SoftLayer.CLI.command.SLCommand,
11+
epilog="""Get status for split or move completed percentage of a given block duplicate volume.""")
12+
@click.argument('volume-id')
13+
@environment.pass_env
14+
def cli(env, volume_id):
15+
"""Get status for split or move completed percentage of a given block duplicate volume."""
16+
table = formatting.Table(['Username', 'Active Conversion Start Timestamp', 'Completed Percentage'])
17+
18+
block_manager = SoftLayer.BlockStorageManager(env.client)
19+
20+
value = block_manager.convert_dupe_status(volume_id)
21+
22+
table.add_row(
23+
[
24+
value['volumeUsername'],
25+
value['activeConversionStartTime'],
26+
value['deDuplicateConversionPercentage']
27+
]
28+
)
29+
30+
env.fout(table)

SoftLayer/CLI/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from SoftLayer.CLI import formatting
1818
from SoftLayer.CLI import routes
1919

20-
# pylint: disable=too-many-instance-attributes, invalid-name, no-self-use
20+
# pylint: disable=too-many-instance-attributes, invalid-name
2121

2222
# Calling pkg_resources.iter_entry_points shows a false-positive
2323
# pylint: disable=no-member
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Get status for split or move completed percentage of a given file duplicate volume."""
2+
# :license: MIT, see LICENSE for more details.
3+
4+
import click
5+
import SoftLayer
6+
from SoftLayer.CLI import environment
7+
from SoftLayer.CLI import formatting
8+
9+
10+
@click.command(cls=SoftLayer.CLI.command.SLCommand,
11+
epilog="""Get status for split or move completed percentage of a given file duplicate volume.""")
12+
@click.argument('volume-id')
13+
@environment.pass_env
14+
def cli(env, volume_id):
15+
"""Get status for split or move completed percentage of a given file duplicate volume."""
16+
table = formatting.Table(['Username', 'Active Conversion Start Timestamp', 'Completed Percentage'])
17+
18+
file_manager = SoftLayer.FileStorageManager(env.client)
19+
20+
value = file_manager.convert_dupe_status(volume_id)
21+
22+
table.add_row(
23+
[
24+
value['volumeUsername'],
25+
value['activeConversionStartTime'],
26+
value['deDuplicateConversionPercentage']
27+
]
28+
)
29+
30+
env.fout(table)

SoftLayer/CLI/routes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
('block:access-list', 'SoftLayer.CLI.block.access.list:cli'),
9494
('block:access-revoke', 'SoftLayer.CLI.block.access.revoke:cli'),
9595
('block:access-password', 'SoftLayer.CLI.block.access.password:cli'),
96+
('block:duplicate-convert-status', 'SoftLayer.CLI.block.duplicate_convert_status:cli'),
9697
('block:subnets-list', 'SoftLayer.CLI.block.subnets.list:cli'),
9798
('block:subnets-assign', 'SoftLayer.CLI.block.subnets.assign:cli'),
9899
('block:subnets-remove', 'SoftLayer.CLI.block.subnets.remove:cli'),
@@ -142,6 +143,7 @@
142143
('file:access-authorize', 'SoftLayer.CLI.file.access.authorize:cli'),
143144
('file:access-list', 'SoftLayer.CLI.file.access.list:cli'),
144145
('file:access-revoke', 'SoftLayer.CLI.file.access.revoke:cli'),
146+
('file:duplicate-convert-status', 'SoftLayer.CLI.file.duplicate_convert_status:cli'),
145147
('file:replica-failback', 'SoftLayer.CLI.file.replication.failback:cli'),
146148
('file:replica-failover', 'SoftLayer.CLI.file.replication.failover:cli'),
147149
('file:disaster-recovery-failover', 'SoftLayer.CLI.file.replication.disaster_recovery_failover:cli'),

SoftLayer/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
:license: MIT, see LICENSE for more details.
77
"""
8-
# pylint: disable=no-self-use
8+
99

1010
__all__ = [
1111
'BasicAuthentication',

SoftLayer/managers/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from SoftLayer import utils
1313

1414
# Invalid names are ignored due to long method names and short argument names
15-
# pylint: disable=invalid-name, no-self-use
15+
# pylint: disable=invalid-name
1616

1717
LOGGER = logging.getLogger(__name__)
1818

SoftLayer/managers/cdn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from SoftLayer import utils
1010

1111

12-
# pylint: disable=no-self-use,too-many-lines,too-many-instance-attributes
12+
# pylint: disable=too-many-lines,too-many-instance-attributes
1313

1414

1515
class CDNManager(utils.IdentifierMixin, object):

SoftLayer/managers/dedicated_host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from SoftLayer import utils
1414

1515
# Invalid names are ignored due to long method names and short argument names
16-
# pylint: disable=invalid-name, no-self-use
16+
# pylint: disable=invalid-name
1717

1818
LOGGER = logging.getLogger(__name__)
1919

SoftLayer/managers/email.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
# Invalid names are ignored due to long method names and short argument names
13-
# pylint: disable=invalid-name, no-self-use
13+
# pylint: disable=invalid-name
1414

1515

1616
class EmailManager(utils.IdentifierMixin, object):

SoftLayer/managers/hardware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
LOGGER = logging.getLogger(__name__)
2121

2222
# Invalid names are ignored due to long method names and short argument names
23-
# pylint: disable=invalid-name, no-self-use, too-many-lines
23+
# pylint: disable=invalid-name, too-many-lines
2424

2525
EXTRA_CATEGORIES = ['pri_ipv6_addresses',
2626
'static_ipv6_addresses',

0 commit comments

Comments
 (0)