Skip to content

Commit

Permalink
Completes #18 ?
Browse files Browse the repository at this point in the history
  • Loading branch information
SLsthompson committed Aug 22, 2014
1 parent 7c9f5b8 commit b61e110
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion lib/softlayer/Account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def find_VLAN_with_number(vlan_number)
vlan_data = self.service.object_mask("mask[id,vlanNumber,primaryRouter,networkSpace]").object_filter(filter).getNetworkVlans
return vlan_data
end

##
# Using the login credentials in the client, retrieve
# the account associated with those credentials.
Expand Down
52 changes: 26 additions & 26 deletions lib/softlayer/VLANFirewall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,32 @@ class VLANFirewall < SoftLayer::ModelBase
end
end

##
# Returns the name of the primary router the firewall is attached to.
# This is often a "customer router" in one of the datacenters.
def primaryRouter
return self['primaryRouter']['hostname']
end

##
# The fully qualified domain name of the physical device the
# firewall is implemented by.
def fullyQualifiedDomainName
if self.has_sl_property?('networkVlanFirewall')
return self['networkVlanFirewall']['fullyQualifiedDomainName']
else
return @softlayer_hash
end
end

##
# Returns true if this is a "high availability" firewall, that is a firewall
# that exists as one member of a redundant pair.
def high_availability?
# note that highAvailabilityFirewallFlag is a boolean in the softlayer hash
return self.has_sl_property?('highAvailabilityFirewallFlag') && self['highAvailabilityFirewallFlag']
end

##
# Cancel the firewall
#
Expand Down Expand Up @@ -170,32 +196,6 @@ def change_routing_bypass!(routing_symbol)
end
end

##
# Returns the name of the primary router the firewall is attached to.
# This is often a "customer router" in one of the datacenters.
def primaryRouter
return self['primaryRouter']['hostname']
end

##
# The fully qualified domain name of the physical device the
# firewall is implemented by.
def fullyQualifiedDomainName
if self.has_sl_property?('networkVlanFirewall')
return self['networkVlanFirewall']['fullyQualifiedDomainName']
else
return @softlayer_hash
end
end

##
# Returns true if this is a "high availability" firewall, that is a firewall
# that exists as one member of a redundant pair.
def high_availability?
# note that highAvailabilityFirewallFlag is a boolean in the softlayer hash
return self.has_sl_property?('highAvailabilityFirewallFlag') && self['highAvailabilityFirewallFlag']
end

##
# Collect a list of the firewalls on the account.
#
Expand Down

0 comments on commit b61e110

Please sign in to comment.