FirewallManager

class SoftLayer.managers.FirewallManager(client)[source]

Manages SoftLayer firewalls

See product information here: https://www.ibm.com/cloud/network-security

Parameters:

client (SoftLayer.API.BaseClient) – the client instance

__init__(client)[source]

Methods

__init__(client)

add_standard_firewall(server_id[, is_virt])

Creates a firewall for the specified virtual/hardware server.

add_vlan_firewall(vlan_id[, ha_enabled])

Creates a firewall for the specified vlan.

cancel_firewall(firewall_id[, dedicated])

Cancels the specified firewall.

edit_dedicated_fwl_rules(firewall_id, rules)

Edit the rules for dedicated firewall.

edit_standard_fwl_rules(firewall_id, rules)

Edit the rules for standard firewall.

get_dedicated_fwl_rules(firewall_id)

Get the rules of a dedicated firewall.

get_dedicated_package([ha_enabled])

Retrieves the dedicated firewall package.

get_firewalls()

Returns a list of all firewalls on the account.

get_firewalls_gatewalls()

Returns a list of all gateway firewalls (gatewalls) on the account.

get_instance(firewall_id[, mask])

Get the firewall information

get_standard_fwl_rules(firewall_id)

Get the rules of a standard firewall.

get_standard_package(server_id[, is_virt])

Retrieves the standard firewall package for the virtual server.

get_summary(identifier, start_date, end_date)

Returns the metric data for the date range provided

resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

Attributes

resolvers

add_standard_firewall(server_id, is_virt=True)[source]

Creates a firewall for the specified virtual/hardware server.

Parameters:
  • server_id (int) – The ID of the server to create the firewall for

  • is_virt (bool) – If true, will create the firewall for a virtual server, otherwise for a hardware server.

Returns:

A dictionary containing the standard virtual server firewall order

add_vlan_firewall(vlan_id, ha_enabled=False)[source]

Creates a firewall for the specified vlan.

Parameters:
  • vlan_id (int) – The ID of the vlan to create the firewall for

  • ha_enabled (bool) – If True, an HA firewall will be created

Returns:

A dictionary containing the VLAN firewall order

cancel_firewall(firewall_id, dedicated=False)[source]

Cancels the specified firewall.

Parameters:
  • firewall_id (int) – Firewall ID to be cancelled.

  • dedicated (bool) – If true, the firewall instance is dedicated, otherwise, the firewall instance is shared.

edit_dedicated_fwl_rules(firewall_id, rules)[source]

Edit the rules for dedicated firewall.

Parameters:
  • firewall_id (integer) – the instance ID of the dedicated firewall

  • rules (list) – the rules to be pushed on the firewall as defined by SoftLayer_Network_Firewall_Update_Request_Rule

edit_standard_fwl_rules(firewall_id, rules)[source]

Edit the rules for standard firewall.

Parameters:
  • firewall_id (integer) – the instance ID of the standard firewall

  • rules (list) – the rules to be pushed on the firewall as defined by SoftLayer_Network_Firewall_Update_Request_Rule

get_dedicated_fwl_rules(firewall_id)[source]

Get the rules of a dedicated firewall.

Parameters:

firewall_id (integer) – the instance ID of the dedicated firewall

Returns:

A list of the rules.

get_dedicated_package(ha_enabled=False)[source]

Retrieves the dedicated firewall package.

Parameters:

ha_enabled (bool) – True if HA is to be enabled on the firewall False for No HA

Returns:

A dictionary containing the dedicated virtual server firewall package

get_firewalls()[source]

Returns a list of all firewalls on the account.

Returns:

A list of firewalls on the current account.

get_firewalls_gatewalls()[source]

Returns a list of all gateway firewalls (gatewalls) on the account.

returns: A list of gateway firewalls (gatewalls) on the current account.

get_instance(firewall_id, mask=None)[source]

Get the firewall information

Parameters:

firewall_id (integer) – the instance ID of the standard firewall

get_standard_fwl_rules(firewall_id)[source]

Get the rules of a standard firewall.

Parameters:

firewall_id (integer) – the instance ID of the standard firewall

Returns:

A list of the rules.

get_standard_package(server_id, is_virt=True)[source]

Retrieves the standard firewall package for the virtual server.

Parameters:
  • server_id (int) – The ID of the server to create the firewall for

  • is_virt (bool) – True if the ID provided is for a virtual server, False for a server

Returns:

A dictionary containing the standard virtual server firewall package

get_summary(identifier, start_date, end_date)[source]

Returns the metric data for the date range provided

:param integer metric_tracking_id

resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

What exactly ‘identifier’ can be depends on the resolvers

Parameters:

identifier (string) – identifying string

Returns list: