Skip to content

Commit 921b49a

Browse files
committed
Merge pull request softlayer#465 from briancline/cci-wat
Removes deprecated names for/references to CCIs
2 parents 615ea99 + 845beb8 commit 921b49a

13 files changed

Lines changed: 48 additions & 53 deletions

File tree

SoftLayer/CLI/firewall/add.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def cli(env, target, firewall_type, high_availability):
2828
if firewall_type == 'vlan':
2929
pkg = mgr.get_dedicated_package(ha_enabled=high_availability)
3030
elif firewall_type == 'vs':
31-
pkg = mgr.get_standard_package(target, is_cci=True)
31+
pkg = mgr.get_standard_package(target, is_virt=True)
3232
elif firewall_type == 'server':
33-
pkg = mgr.get_standard_package(target, is_cci=False)
33+
pkg = mgr.get_standard_package(target, is_virt=False)
3434

3535
if not pkg:
3636
return "Unable to add firewall - Is network public enabled?"
@@ -47,8 +47,8 @@ def cli(env, target, firewall_type, high_availability):
4747
if firewall_type == 'vlan':
4848
mgr.add_vlan_firewall(target, ha_enabled=high_availability)
4949
elif firewall_type == 'vs':
50-
mgr.add_standard_firewall(target, is_cci=True)
50+
mgr.add_standard_firewall(target, is_virt=True)
5151
elif firewall_type == 'server':
52-
mgr.add_standard_firewall(target, is_cci=False)
52+
mgr.add_standard_firewall(target, is_virt=False)
5353

5454
return "Firewall is being created!"

SoftLayer/CLI/firewall/cancel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def cli(env, identifier):
2222
if any([env.skip_confirmations,
2323
formatting.confirm("This action will cancel a firewall from your"
2424
"account. Continue?")]):
25-
if firewall_type in ['cci', 'server']:
25+
if firewall_type in ['vs', 'server']:
2626
mgr.cancel_firewall(firewall_id, dedicated=False)
2727
elif firewall_type == 'vlan':
2828
mgr.cancel_firewall(firewall_id, dedicated=True)

SoftLayer/CLI/firewall/list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def cli(env):
4949

5050
for firewall in vs_firewalls:
5151
table.add_row([
52-
'cci:%s' % firewall['id'],
53-
'CCI - standard',
52+
'vs:%s' % firewall['id'],
53+
'Virtual Server - standard',
5454
'-',
5555
firewall['guestNetworkComponent']['guest']['id']
5656
])

SoftLayer/CLI/routes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@
192192
'meta': 'metadata',
193193
'my': 'metadata',
194194
'vm': 'vs',
195-
'cci': 'vs',
196195
'hardware': 'server',
197196
'hw': 'server',
198197
'bmetal': 'bmc',

SoftLayer/CLI/subnet/detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
@click.command()
1313
@click.argument('identifier')
14-
@click.option('--no-vs', '--no-cci',
14+
@click.option('--no-vs',
1515
is_flag=True,
1616
help="Hide virtual server listing")
1717
@click.option('--no-hardware',
1818
is_flag=True,
1919
help="Hide hardware listing")
2020
@environment.pass_env
21-
def cli(env, identifier, no_cci, no_hardware):
21+
def cli(env, identifier, no_vs, no_hardware):
2222
"""Cancel a subnet."""
2323

2424
mgr = SoftLayer.NetworkManager(env.client)
@@ -42,7 +42,7 @@ def cli(env, identifier, no_cci, no_hardware):
4242
table.add_row(['usable ips',
4343
subnet.get('usableIpAddressCount', formatting.blank())])
4444

45-
if not no_cci:
45+
if not no_vs:
4646
if subnet['virtualGuests']:
4747
vs_table = formatting.Table(['Hostname', 'Domain', 'IP'])
4848
vs_table.align['Hostname'] = 'r'

SoftLayer/CLI/vlan/detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
@click.command()
1414
@click.argument('identifier')
15-
@click.option('--no-vs', '--no-cci',
15+
@click.option('--no-vs',
1616
is_flag=True,
1717
help="Hide virtual server listing")
1818
@click.option('--no-hardware',
1919
is_flag=True,
2020
help="Hide hardware listing")
2121
@environment.pass_env
22-
def cli(env, identifier, no_cci, no_hardware):
22+
def cli(env, identifier, no_vs, no_hardware):
2323
"""Get details about a VLAN."""
2424

2525
mgr = SoftLayer.NetworkManager(env.client)
@@ -55,7 +55,7 @@ def cli(env, identifier, no_cci, no_hardware):
5555

5656
table.add_row(['subnets', subnets])
5757

58-
if not no_cci:
58+
if not no_vs:
5959
if vlan['virtualGuests']:
6060
vs_table = formatting.KeyValueTable(['Hostname',
6161
'Domain',

SoftLayer/managers/firewall.py

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,17 @@ def __init__(self, client):
4040
self.account = self.client['Account']
4141
self.prod_pkg = self.client['Product_Package']
4242

43-
def get_standard_package(self, server_id, is_cci=True):
44-
"""Retrieves the standard firewall package for the CCI.
43+
def get_standard_package(self, server_id, is_virt=True):
44+
"""Retrieves the standard firewall package for the virtual server.
4545
4646
:param int server_id: The ID of the server to create the firewall for
47-
:param bool is_cci: True if the id provided is for a CCI,
48-
False for a server
49-
:returns: A dictionary containing the standard CCI firewall package
47+
:param bool is_virt: True if the ID provided is for a virtual server,
48+
False for a server
49+
:returns: A dictionary containing the standard virtual server firewall
50+
package
5051
"""
5152

52-
firewall_port_speed = self._get_fwl_port_speed(server_id, is_cci)
53+
firewall_port_speed = self._get_fwl_port_speed(server_id, is_virt)
5354

5455
_value = "%s%s" % (firewall_port_speed, "Mbps Hardware Firewall")
5556
_filter = {'items': {'description': utils.query_filter(_value)}}
@@ -61,7 +62,8 @@ def get_dedicated_package(self, ha_enabled=False):
6162
6263
:param bool ha_enabled: True if HA is to be enabled on the firewall
6364
False for No HA
64-
:returns: A dictionary containing the dedicated CCI firewall package
65+
:returns: A dictionary containing the dedicated virtual server firewall
66+
package
6567
"""
6668

6769
fwl_filter = 'Hardware Firewall (Dedicated)'
@@ -87,17 +89,18 @@ def cancel_firewall(self, firewall_id, dedicated=False):
8789
billing_item = self.client['Billing_Item']
8890
return billing_item.cancelService(id=billing_id)
8991

90-
def add_standard_firewall(self, server_id, is_cci=True):
91-
"""Creates a firewall for the specified CCI/Server.
92+
def add_standard_firewall(self, server_id, is_virt=True):
93+
"""Creates a firewall for the specified virtual/hardware server.
9294
93-
:param int cci_id: The ID of the CCI to create the firewall for
94-
:param bool is_cci: If false, will create the firewall for a server,
95-
otherwise for a CCI
96-
:returns: A dictionary containing the standard CCI firewall order
95+
:param int server_id: The ID of the server to create the firewall for
96+
:param bool is_virt: If true, will create the firewall for a virtual
97+
server, otherwise for a hardware server.
98+
:returns: A dictionary containing the standard virtual server firewall
99+
order
97100
"""
98101

99-
package = self.get_standard_package(server_id, is_cci)
100-
if is_cci:
102+
package = self.get_standard_package(server_id, is_virt)
103+
if is_virt:
101104
product_order = {
102105
'complexType': 'SoftLayer_Container_Product_Order_Network_'
103106
'Protection_Firewall',
@@ -121,7 +124,7 @@ def add_vlan_firewall(self, vlan_id, ha_enabled=False):
121124
"""Creates a firewall for the specified vlan.
122125
123126
:param int vlan_id: The ID of the vlan to create the firewall for
124-
:param bool ha_enabled: If True, Ha firewall will be created
127+
:param bool ha_enabled: If True, an HA firewall will be created
125128
126129
:returns: A dictionary containing the VLAN firewall order
127130
"""
@@ -152,16 +155,16 @@ def _get_fwl_billing_item(self, firewall_id, dedicated=False):
152155
fwl_svc = self.client['Network_Component_Firewall']
153156
return fwl_svc.getObject(id=firewall_id, mask=mask)
154157

155-
def _get_fwl_port_speed(self, server_id, is_cci=True):
158+
def _get_fwl_port_speed(self, server_id, is_virt=True):
156159
"""Determines the appropriate speed for a firewall.
157160
158161
:param int server_id: The ID of server the firewall is for
159-
:param bool is_cci: true if the server_id is for a virtual server
162+
:param bool is_virt: True if the server_id is for a virtual server
160163
:returns: a integer representing the Mbps speed of a firewall
161164
"""
162165

163166
fwl_port_speed = 0
164-
if is_cci:
167+
if is_virt:
165168
mask = ('primaryNetworkComponent[maxSpeed]')
166169
svc = self.client['Virtual_Guest']
167170
primary = svc.getObject(mask=mask, id=server_id)

SoftLayer/managers/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ def summary_by_datacenter(self):
329329
information, see the :func:`list_vlans` method instead.
330330
331331
:returns: A dictionary keyed by data center with the data containing a
332-
series of counts for hardware, subnets, CCIs, and other
333-
objects residing within that data center.
332+
set of counts for subnets, hardware, virtual servers, and
333+
other objects residing within that data center.
334334
335335
"""
336336
datacenters = {}

SoftLayer/testing/fixtures/SoftLayer_Virtual_Guest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
'operatingSystem': {
3737
'passwords': [{'username': 'user', 'password': 'pass'}],
3838
'softwareLicense': {
39-
'softwareDescription': {'version': '12.04-64 Minimal for CCI',
39+
'softwareDescription': {'version': '12.04-64 Minimal for VSI',
4040
'name': 'Ubuntu'}}
4141
},
4242
'tagReferences': [{'tag': {'name': 'production'}}],

SoftLayer/tests/CLI/modules/firewall_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def test_list_firewalls(self):
2121
'features': ['HA'],
2222
'firewall id': 'vlan:1234'},
2323
{'features': '-',
24-
'firewall id': 'cci:1234',
24+
'firewall id': 'vs:1234',
2525
'server/vlan id': 1,
26-
'type': 'CCI - standard'},
26+
'type': 'Virtual Server - standard'},
2727
{'features': '-',
2828
'firewall id': 'server:1234',
2929
'server/vlan id': 1,

0 commit comments

Comments
 (0)