Module sysbot.modules.virtualization.vmware.nsx

VMware NSX Module

This module provides methods for managing VMware NSX network virtualization and security, including logical switches, routers, firewalls, load balancers, and security groups using the NSX Manager API.

Classes

class Nsx

VMware NSX module for network virtualization and security management.

This module provides methods to interact with VMware NSX Manager API. Requires an HTTP session with appropriate authentication to NSX Manager.

Ancestors

Methods

def get_alarms(self, alias: str, **kwargs) ‑> list

Get all alarms in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of alarms with their details

def get_bgp_neighbors(self, alias: str, tier_id: str = None, **kwargs) ‑> list

Get BGP neighbors configuration from Tier-0 gateways.

Args

alias
Session identifier
tier_id
Optional Tier-0 gateway ID. If provided, returns BGP neighbors for that gateway. If not provided, returns list of all Tier-0 gateways (use get_tiers for complete list).
**kwargs
Additional command execution options

Returns

List of BGP neighbors if tier_id provided, otherwise list of Tier-0 gateways.

Note

BGP neighbors are configured on Tier-0 gateways only. To get BGP neighbors, first call without tier_id to get gateway IDs, then call with specific tier_id to get its BGP neighbors.

def get_controllers(self, alias: str, **kwargs) ‑> list

Get all NSX controllers in the environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of NSX controllers with their details

def get_edge_clusters(self, alias: str, **kwargs) ‑> list

Get all edge clusters in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of edge clusters with their details

def get_firewall_rules(self, alias: str, section_id: str = None, **kwargs) ‑> list

Get firewall rules from a specific section or all sections.

Args

alias
Session identifier
section_id
Optional specific section ID to get rules from
**kwargs
Additional command execution options

Returns

List of firewall rules with their details

def get_firewall_sections(self, alias: str, **kwargs) ‑> list

Get all firewall sections in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of firewall sections with their details

def get_ip_pools(self, alias: str, **kwargs) ‑> list

Get all IP pools in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of IP pools with their details

def get_ldap_source(self, alias: str, **kwargs) ‑> list

Get LDAP identity source configuration.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of LDAP identity sources with their details

def get_logical_routers(self, alias: str, **kwargs) ‑> list

Get all logical routers in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of logical routers with their details

def get_logical_switches(self, alias: str, **kwargs) ‑> list

Get all logical switches in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of logical switches with their details

def get_ntp_source(self, alias: str, **kwargs) ‑> dict

Get NTP source configuration.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

Dictionary containing NTP configuration

def get_security_groups(self, alias: str, **kwargs) ‑> list

Get all security groups in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of security groups with their details

def get_segments(self, alias: str, **kwargs) ‑> list

Get all segments in NSX-T environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of segments with their details

def get_syslog_source(self, alias: str, **kwargs) ‑> list

Get syslog exporter configuration.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of syslog exporters with their details

def get_tiers(self, alias: str, tier_type: str = None, **kwargs) ‑> list

Get Tier gateways (Tier-0 and Tier-1).

Args

alias
Session identifier
tier_type
Optional tier type - "tier-0s" or "tier-1s". If None, returns both.
**kwargs
Additional command execution options

Returns

List of tier gateways with their details

def get_transport_zones(self, alias: str, **kwargs) ‑> list

Get all transport zones in NSX environment.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

List of transport zones with their details

def get_version(self, alias: str, **kwargs) ‑> dict

Get NSX Manager version information.

Args

alias
Session identifier
**kwargs
Additional command execution options

Returns

Dictionary containing version information