Skip to content

Commit 2ba40f9

Browse files
Merge pull request #1456 from allmightyspiff/rwhois_removal
Removing the rwhois commands
2 parents 9277add + c8bb4ff commit 2ba40f9

File tree

9 files changed

+1
-263
lines changed

9 files changed

+1
-263
lines changed

SoftLayer/CLI/routes.py

-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@
232232
('order:quote', 'SoftLayer.CLI.order.quote:cli'),
233233
('order:lookup', 'SoftLayer.CLI.order.lookup:cli'),
234234

235-
('rwhois', 'SoftLayer.CLI.rwhois'),
236-
('rwhois:edit', 'SoftLayer.CLI.rwhois.edit:cli'),
237-
('rwhois:show', 'SoftLayer.CLI.rwhois.show:cli'),
238-
239235
('hardware', 'SoftLayer.CLI.hardware'),
240236
('hardware:bandwidth', 'SoftLayer.CLI.hardware.bandwidth:cli'),
241237
('hardware:cancel', 'SoftLayer.CLI.hardware.cancel:cli'),

SoftLayer/CLI/rwhois/__init__.py

-1
This file was deleted.

SoftLayer/CLI/rwhois/edit.py

-55
This file was deleted.

SoftLayer/CLI/rwhois/show.py

-34
This file was deleted.

SoftLayer/managers/network.py

+1-36
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757

5858
class NetworkManager(object):
59-
"""Manage SoftLayer network objects: VLANs, subnets, IPs and rwhois
59+
"""Manage SoftLayer network objects: VLANs, subnets and IPs
6060
6161
See product information here: https://www.ibm.com/cloud/network
6262
@@ -311,34 +311,6 @@ def detach_securitygroup_components(self, group_id, component_ids):
311311
return self.security_group.detachNetworkComponents(component_ids,
312312
id=group_id)
313313

314-
def edit_rwhois(self, abuse_email=None, address1=None, address2=None,
315-
city=None, company_name=None, country=None,
316-
first_name=None, last_name=None, postal_code=None,
317-
private_residence=None, state=None):
318-
"""Edit rwhois record."""
319-
update = {}
320-
for key, value in [('abuseEmail', abuse_email),
321-
('address1', address1),
322-
('address2', address2),
323-
('city', city),
324-
('companyName', company_name),
325-
('country', country),
326-
('firstName', first_name),
327-
('lastName', last_name),
328-
('privateResidenceFlag', private_residence),
329-
('state', state),
330-
('postalCode', postal_code)]:
331-
if value is not None:
332-
update[key] = value
333-
334-
# If there's anything to update, update it
335-
if update:
336-
rwhois = self.get_rwhois()
337-
return self.client['Network_Subnet_Rwhois_Data'].editObject(
338-
update, id=rwhois['id'])
339-
340-
return True
341-
342314
def edit_securitygroup(self, group_id, name=None, description=None):
343315
"""Edit security group details.
344316
@@ -408,13 +380,6 @@ def ip_lookup(self, ip_address):
408380
obj = self.client['Network_Subnet_IpAddress']
409381
return obj.getByIpAddress(ip_address, mask='hardware, virtualGuest')
410382

411-
def get_rwhois(self):
412-
"""Returns the RWhois information about the current account.
413-
414-
:returns: A dictionary containing the account's RWhois information.
415-
"""
416-
return self.account.getRwhoisData()
417-
418383
def get_securitygroup(self, group_id, **kwargs):
419384
"""Returns the information about the given security group.
420385

docs/cli.rst

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ To discover the available commands, simply type `slcli`.
9292
object-storage Object Storage.
9393
order View and order from the catalog.
9494
report Reports.
95-
rwhois Referral Whois.
9695
securitygroup Network security groups.
9796
setup Edit configuration.
9897
shell Enters a shell for slcli.

docs/cli/rwhois.rst

-12
This file was deleted.

tests/CLI/modules/rwhois_tests.py

-81
This file was deleted.

tests/managers/network_tests.py

-39
Original file line numberDiff line numberDiff line change
@@ -222,39 +222,6 @@ def test_detach_securitygroup_components(self):
222222
'detachNetworkComponents',
223223
identifier=100, args=([500, 600],))
224224

225-
def test_edit_rwhois(self):
226-
result = self.network.edit_rwhois(
227-
abuse_email='[email protected]',
228-
address1='123 Test Street',
229-
address2='Apt. #31',
230-
city='Anywhere',
231-
company_name='TestLayer',
232-
country='US',
233-
first_name='Bob',
234-
last_name='Bobinson',
235-
postal_code='9ba62',
236-
private_residence=False,
237-
state='TX')
238-
239-
self.assertEqual(result, True)
240-
expected = {
241-
'abuseEmail': '[email protected]',
242-
'address1': '123 Test Street',
243-
'address2': 'Apt. #31',
244-
'city': 'Anywhere',
245-
'companyName': 'TestLayer',
246-
'country': 'US',
247-
'firstName': 'Bob',
248-
'lastName': 'Bobinson',
249-
'postalCode': '9ba62',
250-
'privateResidenceFlag': False,
251-
'state': 'TX',
252-
}
253-
self.assert_called_with('SoftLayer_Network_Subnet_Rwhois_Data',
254-
'editObject',
255-
identifier='id',
256-
args=(expected,))
257-
258225
def test_edit_securitygroup(self):
259226
result = self.network.edit_securitygroup(100, name='foobar')
260227

@@ -290,12 +257,6 @@ def test_edit_securitygroup_rule_unset(self):
290257
'portRangeMin': -1, 'portRangeMax': -1,
291258
'ethertype': '', 'remoteIp': ''}],))
292259

293-
def test_get_rwhois(self):
294-
result = self.network.get_rwhois()
295-
296-
self.assertEqual(result, fixtures.SoftLayer_Account.getRwhoisData)
297-
self.assert_called_with('SoftLayer_Account', 'getRwhoisData')
298-
299260
def test_get_securitygroup(self):
300261
result = self.network.get_securitygroup(100)
301262

0 commit comments

Comments
 (0)