diff --git a/SoftLayer/CLI/block/order.py b/SoftLayer/CLI/block/order.py index 528e4e1f8..bdd0100e0 100644 --- a/SoftLayer/CLI/block/order.py +++ b/SoftLayer/CLI/block/order.py @@ -78,6 +78,7 @@ def cli(env, storage_type, size, iops, tier, os_type, 'Hourly billing is only available for the storage_as_a_service service offering' ) + order = {} if storage_type == 'performance': if iops is None: raise exceptions.CLIAbort('Option --iops required with Performance') diff --git a/SoftLayer/CLI/file/order.py b/SoftLayer/CLI/file/order.py index cca7baf5e..966eb6542 100644 --- a/SoftLayer/CLI/file/order.py +++ b/SoftLayer/CLI/file/order.py @@ -12,26 +12,18 @@ @click.command(cls=SoftLayer.CLI.command.SLCommand, context_settings=CONTEXT_SETTINGS) -@click.option('--storage-type', - help='Type of file storage volume', - type=click.Choice(['performance', 'endurance']), - required=True) -@click.option('--size', - type=int, - help='Size of file storage volume in GB', - required=True) -@click.option('--iops', - type=int, +@click.option('--storage-type', required=True, type=click.Choice(['performance', 'endurance']), + help='Type of file storage volume') +@click.option('--size', type=int, required=True, + help='Size of file storage volume in GB') +@click.option('--iops', type=int, help="""Performance Storage IOPs. Options vary based on storage size. [required for storage-type performance]""") -@click.option('--tier', - help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]', - type=click.Choice(['0.25', '2', '4', '10'])) -@click.option('-l', '--location', - help='Datacenter short name (e.g.: dal09)', - required=True) -@click.option('--snapshot-size', - type=int, +@click.option('--tier', type=click.Choice(['0.25', '2', '4', '10']), + help='Endurance Storage Tier (IOP per GB) [required for storage-type endurance]') +@click.option('-l', '--location', required=True, + help='Datacenter short name (e.g.: dal09)') +@click.option('--snapshot-size', type=int, help='Optional parameter for ordering snapshot ' 'space along with endurance file storage; specifies ' 'the size (in GB) of snapshot space to order') @@ -43,9 +35,7 @@ 'storage_as_a_service', 'enterprise', 'performance'])) -@click.option('--billing', - type=click.Choice(['hourly', 'monthly']), - default='monthly', +@click.option('--billing', type=click.Choice(['hourly', 'monthly']), default='monthly', help="Optional parameter for Billing rate (default to monthly)") @click.option('--force', default=False, is_flag=True, help="Force order file storage volume without confirmation") @environment.pass_env @@ -83,6 +73,7 @@ def cli(env, storage_type, size, iops, tier, 'Hourly billing is only available for the storage_as_a_service service offering' ) + order = {} if storage_type == 'performance': if iops is None: raise exceptions.CLIAbort('Option --iops required with Performance') diff --git a/SoftLayer/CLI/firewall/add.py b/SoftLayer/CLI/firewall/add.py index 9a9966d82..3df2da32c 100644 --- a/SoftLayer/CLI/firewall/add.py +++ b/SoftLayer/CLI/firewall/add.py @@ -22,7 +22,7 @@ def cli(env, target, firewall_type, high_availability, force): """ mgr = SoftLayer.FirewallManager(env.client) - + pkg = {} if not env.skip_confirmations: if firewall_type == 'vlan': pkg = mgr.get_dedicated_package(ha_enabled=high_availability) diff --git a/SoftLayer/CLI/firewall/detail.py b/SoftLayer/CLI/firewall/detail.py index c07695d2b..8f0d276dd 100644 --- a/SoftLayer/CLI/firewall/detail.py +++ b/SoftLayer/CLI/firewall/detail.py @@ -82,7 +82,6 @@ def cli(env, identifier, password): else: click.secho('Invalid firewall type %s: firewall type should be either vlan, multiVlan, vs or server.' % firewall_type, fg='red') - return def get_rules_table(rules): diff --git a/SoftLayer/managers/dedicated_host.py b/SoftLayer/managers/dedicated_host.py index f9eda0325..6decff128 100644 --- a/SoftLayer/managers/dedicated_host.py +++ b/SoftLayer/managers/dedicated_host.py @@ -431,7 +431,9 @@ def _get_backend_router(self, locations, item): hostname ''' cpu_count = item['capacity'] - + mem_capacity = {} + disk_capacity = {} + gpuComponents = {} for capacity in item['bundleItems']: for category in capacity['categories']: if category['categoryCode'] == 'dedicated_host_ram': diff --git a/SoftLayer/managers/hardware.py b/SoftLayer/managers/hardware.py index 69add1cf7..6564fda0f 100644 --- a/SoftLayer/managers/hardware.py +++ b/SoftLayer/managers/hardware.py @@ -1123,6 +1123,7 @@ def _get_disk_price_detail(self, disk_data, upgrade_prices, disk_channel, disk_t :param String disk_type: Disk type. """ + disk_price = {} if disk_data.get('description') == disk_type: if "add" in disk_type: raise SoftLayerError("Unable to add the disk because this already exists.")