Skip to content

Commit c02bb72

Browse files
Fixed tox issues
1 parent 522b97f commit c02bb72

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

SoftLayer/CLI/block/order.py

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def cli(env, storage_type, size, iops, tier, os_type,
7878
'Hourly billing is only available for the storage_as_a_service service offering'
7979
)
8080

81+
order = {}
8182
if storage_type == 'performance':
8283
if iops is None:
8384
raise exceptions.CLIAbort('Option --iops required with Performance')

SoftLayer/CLI/file/order.py

+12-21
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,18 @@
1212

1313

1414
@click.command(cls=SoftLayer.CLI.command.SLCommand, context_settings=CONTEXT_SETTINGS)
15-
@click.option('--storage-type',
16-
help='Type of file storage volume',
17-
type=click.Choice(['performance', 'endurance']),
18-
required=True)
19-
@click.option('--size',
20-
type=int,
21-
help='Size of file storage volume in GB',
22-
required=True)
23-
@click.option('--iops',
24-
type=int,
15+
@click.option('--storage-type', required=True, type=click.Choice(['performance', 'endurance']),
16+
help='Type of file storage volume')
17+
@click.option('--size', type=int, required=True,
18+
help='Size of file storage volume in GB')
19+
@click.option('--iops', type=int,
2520
help="""Performance Storage IOPs. Options vary based on storage size.
2621
[required for storage-type performance]""")
27-
@click.option('--tier',
28-
help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]',
29-
type=click.Choice(['0.25', '2', '4', '10']))
30-
@click.option('-l', '--location',
31-
help='Datacenter short name (e.g.: dal09)',
32-
required=True)
33-
@click.option('--snapshot-size',
34-
type=int,
22+
@click.option('--tier', type=click.Choice(['0.25', '2', '4', '10']),
23+
help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]')
24+
@click.option('-l', '--location', required=True,
25+
help='Datacenter short name (e.g.: dal09)')
26+
@click.option('--snapshot-size', type=int,
3527
help='Optional parameter for ordering snapshot '
3628
'space along with endurance file storage; specifies '
3729
'the size (in GB) of snapshot space to order')
@@ -43,9 +35,7 @@
4335
'storage_as_a_service',
4436
'enterprise',
4537
'performance']))
46-
@click.option('--billing',
47-
type=click.Choice(['hourly', 'monthly']),
48-
default='monthly',
38+
@click.option('--billing', type=click.Choice(['hourly', 'monthly']), default='monthly',
4939
help="Optional parameter for Billing rate (default to monthly)")
5040
@click.option('--force', default=False, is_flag=True, help="Force order file storage volume without confirmation")
5141
@environment.pass_env
@@ -83,6 +73,7 @@ def cli(env, storage_type, size, iops, tier,
8373
'Hourly billing is only available for the storage_as_a_service service offering'
8474
)
8575

76+
order = {}
8677
if storage_type == 'performance':
8778
if iops is None:
8879
raise exceptions.CLIAbort('Option --iops required with Performance')

SoftLayer/CLI/firewall/add.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def cli(env, target, firewall_type, high_availability, force):
2222
"""
2323

2424
mgr = SoftLayer.FirewallManager(env.client)
25-
25+
pkg = {}
2626
if not env.skip_confirmations:
2727
if firewall_type == 'vlan':
2828
pkg = mgr.get_dedicated_package(ha_enabled=high_availability)

SoftLayer/CLI/firewall/detail.py

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def cli(env, identifier, password):
8282
else:
8383
click.secho('Invalid firewall type %s: firewall type should be either vlan, multiVlan, vs or server.'
8484
% firewall_type, fg='red')
85-
return
8685

8786

8887
def get_rules_table(rules):

SoftLayer/managers/dedicated_host.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ def _get_backend_router(self, locations, item):
431431
hostname
432432
'''
433433
cpu_count = item['capacity']
434-
434+
mem_capacity = {}
435+
disk_capacity = {}
436+
gpuComponents = {}
435437
for capacity in item['bundleItems']:
436438
for category in capacity['categories']:
437439
if category['categoryCode'] == 'dedicated_host_ram':

SoftLayer/managers/hardware.py

+1
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@ def _get_disk_price_detail(self, disk_data, upgrade_prices, disk_channel, disk_t
11231123
:param String disk_type: Disk type.
11241124
11251125
"""
1126+
disk_price = {}
11261127
if disk_data.get('description') == disk_type:
11271128
if "add" in disk_type:
11281129
raise SoftLayerError("Unable to add the disk because this already exists.")

0 commit comments

Comments
 (0)