Skip to content

Commit b61e110

Browse files
committed
Completes #18 ?
1 parent 7c9f5b8 commit b61e110

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

lib/softlayer/Account.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def find_VLAN_with_number(vlan_number)
143143
vlan_data = self.service.object_mask("mask[id,vlanNumber,primaryRouter,networkSpace]").object_filter(filter).getNetworkVlans
144144
return vlan_data
145145
end
146-
146+
147147
##
148148
# Using the login credentials in the client, retrieve
149149
# the account associated with those credentials.

lib/softlayer/VLANFirewall.rb

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,32 @@ class VLANFirewall < SoftLayer::ModelBase
5151
end
5252
end
5353

54+
##
55+
# Returns the name of the primary router the firewall is attached to.
56+
# This is often a "customer router" in one of the datacenters.
57+
def primaryRouter
58+
return self['primaryRouter']['hostname']
59+
end
60+
61+
##
62+
# The fully qualified domain name of the physical device the
63+
# firewall is implemented by.
64+
def fullyQualifiedDomainName
65+
if self.has_sl_property?('networkVlanFirewall')
66+
return self['networkVlanFirewall']['fullyQualifiedDomainName']
67+
else
68+
return @softlayer_hash
69+
end
70+
end
71+
72+
##
73+
# Returns true if this is a "high availability" firewall, that is a firewall
74+
# that exists as one member of a redundant pair.
75+
def high_availability?
76+
# note that highAvailabilityFirewallFlag is a boolean in the softlayer hash
77+
return self.has_sl_property?('highAvailabilityFirewallFlag') && self['highAvailabilityFirewallFlag']
78+
end
79+
5480
##
5581
# Cancel the firewall
5682
#
@@ -170,32 +196,6 @@ def change_routing_bypass!(routing_symbol)
170196
end
171197
end
172198

173-
##
174-
# Returns the name of the primary router the firewall is attached to.
175-
# This is often a "customer router" in one of the datacenters.
176-
def primaryRouter
177-
return self['primaryRouter']['hostname']
178-
end
179-
180-
##
181-
# The fully qualified domain name of the physical device the
182-
# firewall is implemented by.
183-
def fullyQualifiedDomainName
184-
if self.has_sl_property?('networkVlanFirewall')
185-
return self['networkVlanFirewall']['fullyQualifiedDomainName']
186-
else
187-
return @softlayer_hash
188-
end
189-
end
190-
191-
##
192-
# Returns true if this is a "high availability" firewall, that is a firewall
193-
# that exists as one member of a redundant pair.
194-
def high_availability?
195-
# note that highAvailabilityFirewallFlag is a boolean in the softlayer hash
196-
return self.has_sl_property?('highAvailabilityFirewallFlag') && self['highAvailabilityFirewallFlag']
197-
end
198-
199199
##
200200
# Collect a list of the firewalls on the account.
201201
#

0 commit comments

Comments
 (0)