com.vmware.appliance.techpreview.networking.firewall package

Submodules

com.vmware.appliance.techpreview.networking.firewall.addr_client module

class com.vmware.appliance.techpreview.networking.firewall.addr_client.Inbound(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Inbound class provides methods Operations for Firewall rules.

Parameters:config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.
class DeleteFirewallRule(position=None, all=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Inbound.DeleteFirewallRule class Structure that defines networking.firewall.addr.inbound.delete api input argument

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • position (long) – Position before which to insert the rule (zero-based). If you try to insert the rule in a position whose number is greater than the number of rules, the firewall rule is inserted at the end of the list.
  • all (bool) – Delete all firewall rules. Set all argument to “true” to delete all rules or set the all argument to “false” to delete a single rule.
class Inbound.FirewallAddressRule(address=None, prefix=None, policy=None, interface_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Inbound.FirewallAddressRule class Structure that defines a single address-based firewall rule.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters:
  • address (str) – IPv4 or IPv6 address.
  • prefix (long) – CIDR prefix used to mask address. For example, an IPv4 prefix of 24 ignores the low-order 8 bits of address.
  • policy (Inbound.FirewallRulePolicy) – The allow or deny policy of this rule.
  • interface_name (str) – The interface to which this rule applies. An empty string or “\*” indicates that the rule applies to all interfaces.
class Inbound.FirewallRulePolicy(string)

Bases: vmware.vapi.bindings.enum.Enum

Inbound.FirewallRulePolicy class Defines firewall rule policies

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters:string (str) – String value for the FirewallRulePolicy instance.
allow = FirewallRulePolicy(string=u'allow')

Allow packet with corresponding address.

deny = FirewallRulePolicy(string=u'deny')

Deny packet with correpsonding address.

Inbound.add(pos, rule)

Add a firewall rule to allow or deny traffic from incoming IP address.

Parameters:
  • pos (long) – Position before which to insert the rule (zero-based). If you try to insert the rule in a position whose number is greater than the number of rules, the firewall rule is inserted at the end of the list.
  • rule (Inbound.FirewallAddressRule) – Firewall IP-based rule.
Raise:

com.vmware.vapi.std.errors_client.Error Generic error

Inbound.delete(config)

Delete specific rule at a given position or delete all rules.

Parameters:config (Inbound.DeleteFirewallRule) – Delete a firewall rule
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Inbound.list()

Get ordered list of inbound IP addresses that are allowed or denied by firewall.

Return type:list of Inbound.FirewallAddressRule
Returns:List of address-based firewall rules.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
Inbound.set(rules)

Set list of inbound IP addresses to allow or deny by firewall. This replaces all existing rules. Firewall rules have no impact on closed ports because these ports are closed for all traffic.

Parameters:rules (list of Inbound.FirewallAddressRule) – List of address-based firewall rules.
Raise:com.vmware.vapi.std.errors_client.Error Generic error

Module contents