Thanks to visit codestin.com
Credit goes to github.com

Skip to content

v6.2.2 release. #2151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SoftLayer/CLI/block/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
33 changes: 12 additions & 21 deletions SoftLayer/CLI/file/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/CLI/firewall/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion SoftLayer/CLI/firewall/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

:license: MIT, see LICENSE for more details.
"""
VERSION = 'v6.2.1'
VERSION = 'v6.2.2'
API_PUBLIC_ENDPOINT = 'https://api.softlayer.com/xmlrpc/v3.1/'
API_PRIVATE_ENDPOINT = 'https://api.service.softlayer.com/xmlrpc/v3.1/'
API_PUBLIC_ENDPOINT_REST = 'https://api.softlayer.com/rest/v3.1/'
Expand Down
4 changes: 3 additions & 1 deletion SoftLayer/managers/dedicated_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions SoftLayer/managers/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/transports/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_session(user_agent):
'Content-Type': 'application/json',
'User-Agent': user_agent,
})
retry = Retry(connect=3, backoff_factor=3)
retry = Retry(total=3, connect=1, backoff_factor=1)
adapter = HTTPAdapter(max_retries=retry)
client.mount('https://', adapter)
return client
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name='SoftLayer',
version='v6.2.1',
version='v6.2.2',
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/x-rst',
Expand Down
Loading