SoftLayer.firewall¶
Firewall Manager/helpers
license: | MIT, see LICENSE for more details. |
---|
- class SoftLayer.managers.firewall.FirewallManager(client)[source]¶
Manages firewalls.
Parameters: client (SoftLayer.API.Client) – the API client instance - add_standard_firewall(server_id, is_cci=True)[source]¶
Creates a firewall for the specified CCI/Server
Parameters: - cci_id (int) – The ID of the CCI to create the firewall for
- is_cci (bool) – If false, will create the firewall for a server, otherwise for a CCI
Returns: A dictionary containing the standard CCI 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, 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 (dict) – the rules to be pushed on the firewall
- 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 (dict) – the rules to be pushed on the firewall
- 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 CCI firewall package
- get_firewalls()[source]¶
Returns a list of all firewalls on the account.
Returns: A list of firewalls on the current account.
- 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_cci=True)[source]¶
Retrieves the standard firewall package for the CCI.
Parameters: - server_id (int) – The ID of the server to create the firewall for
- is_cci (bool) – True if the id provided is for a CCI, False for a server
Returns: A dictionary containing the standard CCI firewall package
- 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: