Skip to content

Commit 727cc90

Browse files
committed
Minor cosmetic and parameter updates
1 parent 677f434 commit 727cc90

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

SoftLayer/CLI/block/snapshot/get_notify_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ def cli(env, volume_id):
2424
click.echo('Snapshots space usage threshold warning flag setting is enabled for volume %s'
2525
% (volume_id))
2626
else:
27-
click.echo('DISABLED: Snapshots space usage threshold warning flag setting is disabled for volume %s'
27+
click.echo('Snapshots space usage threshold warning flag setting is disabled for volume %s'
2828
% (volume_id))

SoftLayer/CLI/block/snapshot/set_notify_status.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@environment.pass_env
1616
def cli(env, volume_id, notification_flag):
1717
"""Enables/Disables snapshot space usage threshold warning for a given volume"""
18-
1918
if (notification_flag not in ['True', 'False']):
2019
raise exceptions.CLIAbort(
2120
'--notification-flag must be True or False')

SoftLayer/managers/block.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def set_block_volume_snapshot_notification(self, volume_id, notification_flag, *
110110
:param notification-flag: Enable/Disable flag for snapshot warning notification.
111111
:return: Enables/Disables snapshot space usage threshold warning for a given volume.
112112
"""
113-
return self.client.call('Network_Storage', 'setSnapshotNotification', notification_flag, id=volume_id,)
113+
return self.client.call('Network_Storage', 'setSnapshotNotification', notification_flag, id=volume_id, **kwargs)
114114

115115
def get_block_snapshots_notification_status(self, volume_id, **kwargs):
116116
"""returns Enabled/Disabled snapshot space usage threshold warning for a given volume.
@@ -119,7 +119,7 @@ def get_block_snapshots_notification_status(self, volume_id, **kwargs):
119119
:param kwargs:
120120
:return: Enabled/Disabled snapshot space usage threshold warning for a given volume.
121121
"""
122-
return self.client.call('Network_Storage', 'getSnapshotNotificationStatus', id=volume_id,)
122+
return self.client.call('Network_Storage', 'getSnapshotNotificationStatus', id=volume_id, **kwargs)
123123

124124
def assign_subnets_to_acl(self, access_id, subnet_ids):
125125
"""Assigns subnet records to ACL for the access host.

SoftLayer/managers/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def set_file_volume_snapshot_notification(self, volume_id, notification_flag, **
137137
:param notification-flag: Enable/Disable flag for snapshot warning notification.
138138
:return: Enables/Disables snapshot space usage threshold warning for a given volume.
139139
"""
140-
return self.client.call('Network_Storage', 'setSnapshotNotification', notification_flag, id=volume_id,)
140+
return self.client.call('Network_Storage', 'setSnapshotNotification', notification_flag, id=volume_id, **kwargs)
141141

142142
def get_file_snapshots_notification_status(self, volume_id, **kwargs):
143143
"""returns Enabled/Disabled snapshot space usage threshold warning for a given volume.
@@ -146,7 +146,7 @@ def get_file_snapshots_notification_status(self, volume_id, **kwargs):
146146
:param kwargs:
147147
:return: Enabled/Disabled snapshot space usage threshold warning for a given volume.
148148
"""
149-
return self.client.call('Network_Storage', 'getSnapshotNotificationStatus', id=volume_id,)
149+
return self.client.call('Network_Storage', 'getSnapshotNotificationStatus', id=volume_id, **kwargs)
150150
def order_file_volume(self, storage_type, location, size,
151151
iops=None, tier_level=None, snapshot_size=None,
152152
service_offering='storage_as_a_service',

SoftLayer/managers/storage.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ def get_volume_snapshot_list(self, volume_id, **kwargs):
112112
kwargs['mask'] = ','.join(items)
113113

114114
return self.client.call('Network_Storage', 'getSnapshots', id=volume_id, **kwargs)
115+
def set_volume_snapshot_notification(self, volume_id, notification_flag, **kwargs):
116+
"""Returns a list of snapshots for the specified volume.
117+
118+
:param volume_id: ID of volume.
119+
:param kwargs:
120+
:return: Returns a list of snapshots for the specified volume.
121+
"""
122+
123+
return self.client.call('Network_Storage', 'setSnapshotNotification', notification_flag, id=volume_id , **kwargs)
115124

116125
def authorize_host_to_volume(self, volume_id, hardware_ids=None, virtual_guest_ids=None,
117126
ip_address_ids=None, subnet_ids=None):

0 commit comments

Comments
 (0)