neulab/tldr huggingface dataset:
• ubiquiti_edgeswitch: Ubiquiti Edge
• vyatta_vyos: VyOS
• vyos: VyOS
• brocade_fastiron_telnet: Brocade Fastiron over Telnet
• brocade_netiron_telnet: Brocade Netiron over Telnet
• cisco_ios_telnet: Cisco IOS over Telnet
• apresia_aeos_telnet: Apresia AEOS over Telnet
• arista_eos_telnet: Arista EOS over Telnet
• hp_procurve_telnet: HP Procurve over Telnet
• hp_comware_telnet: HP Comware over Telnet
• juniper_junos_telnet: Juniper Junos over Telnet
• calix_b6_telnet: Calix B6 over Telnet
• dell_powerconnect_telnet: Dell PowerConnect over Telnet
• generic_termserver_telnet: TerminalServer over Telnet
• extreme_telnet: Extreme Networks over Telnet
• ruckus_fastiron_telnet: Ruckus Fastiron over Telnet
• cisco_ios_serial: Cisco IOS over serial port
• ip - IP address of target device (not required if host is provided)
• host - Hostname of target device (not required if ip is provided)
• username - Username to authenticate against target device, if required
• password - Password to authenticate against target device, if required
• secret - The enable password if target device requires one
• port - The destination port used to connect to the target device
• global_delay_factor - Multiplication factor affecting Netmiko delays (default: 1)
• use_keys - Connect to target device using SSH keys (default: False)
• key_file - Filename path of the SSH key file to use
• allow_agent - Enable use of SSH key-agent
• ssh_strict - Automatically reject unknown SSH host keys (default: False, which means unknown SSH host keys will be accepted)
• system_host_keys - Load host keys from the user's "known_hosts" file (default: False)
• alt_host_keys - If True,  host keys will be loaded from the file specified in alt_key_file (default: False)
• alt_key_file - SSH host key file to use (if alt_host_keys=True)
• ssh_config_file - File name of OpenSSH configuration file
• timeout - Connection timeout, in seconds (default: 90)
• session_timeout - Set a timeout for parallel requests, in seconds (default: 60)
• keepalive - Send SSH keepalive packets at a specific interval, in seconds. Currently defaults to 0, for backwards compatibility (it will not attempt to keep the connection alive using the KEEPALIVE packets).
• default_enter - Character(s) to send to correspond to enter key (default: \n)
• response_return - Character(s) to use in normalized return data to represent enter key (default: \n)
Example (when not running in a netmiko Proxy Minion):
netmiko: username: test password: test
In case the username and password are the same on any device you are targeting, the block above (besides other parameters specific to your environment you might need) should suffice to be able to execute commands from outside a netmiko Proxy, e.g.:
salt '*' netmiko.send_command 'show version' host=router1.example.com device_type=juniper salt '*' netmiko.send_config https://bit.ly/2sgljCB host=sw2.example.com device_type=cisco_ios
NOTE: Remember that the above applies only when not running in a netmiko Proxy Minion. If you want to use the <salt.proxy.netmiko_px>, please follow the documentation notes for a proper setup.
salt.modules.netmiko_mod.call(method, *args, **kwargs) Invoke an arbitrary Netmiko method.
method The name of the Netmiko method to invoke.
salt.modules.netmiko_mod.commit(**kwargs) Commit the configuration changes.
WARNING: This function is supported only on the platforms that support the commit operation.
salt '*' netmiko.commit
salt.modules.netmiko_mod.enter_config_mode(**kwargs) Enter into config mode.
config_command Configuration command to send to the device.
pattern Pattern to terminate reading of channel.
salt '*' netmiko.enter_config_mode salt '*' netmiko.enter_config_mode device_type='juniper_junos' ip='192.168.0.1' username='example'
salt.modules.netmiko_mod.exit_config_mode(**kwargs) Exit from configuration mode.
exit_config Command to exit configuration mode.
salt '*' netmiko.exit_config_mode salt '*' netmiko.exit_config_mode device_type='juniper' ip='192.168.0.1' username='example'
salt.modules.netmiko_mod.get_connection(**kwargs) Return the Netmiko connection object.
conn = __salt__['netmiko.get_connection'](host='router1.example.com', username='example', password='example') show_if = conn.send_command('show interfaces') conn.disconnect()
salt.modules.netmiko_mod.multi_call(*methods, **kwargs) Invoke multiple Netmiko methods at once, and return their output, as list.
methods A list of dictionaries with the following keys:
• name: the name of the Netmiko method to be executed.
• args: list of arguments to be sent to the Netmiko method.
• kwargs: dictionary of arguments to be sent to the Netmiko method.
kwargs Key-value dictionary with the connection details (when not running under a Proxy Minion).
salt.modules.netmiko_mod.send_command(command_string, **kwargs) Execute command_string on the SSH channel using a pattern-based mechanism.  Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.
command_string The command to be executed on the remote device.
salt '*' netmiko.send_command 'show version' salt '*' netmiko.send_command 'show_version' host='router1.example.com' username='example' device_type='cisco_ios'
salt.modules.netmiko_mod.send_command_timing(command_string, **kwargs) Execute command_string on the SSH channel using a delay-based mechanism.  Generally used for show commands.
salt '*' netmiko.send_command_timing 'show version' salt '*' netmiko.send_command_timing 'show version' host='router1.example.com' username='example' device_type='arista_eos'
salt.modules.netmiko_mod.send_config(config_file=None, config_commands=None, template_engine='jinja', commit=False, context=None, defaults=None, saltenv='base', **kwargs) Send configuration commands down the SSH channel.  Return the configuration lines sent to the device.
The function is flexible to send the configuration from a local or remote file, or simply the commands as list.
config_commands Multiple configuration commands to be sent to the device.
defaults Default values of the context_dict.
salt '*' netmiko.send_config config_commands="['interface GigabitEthernet3', 'no ip address']" salt '*' netmiko.send_config config_commands="['snmp-server location {{ grains.location }}']" salt '*' netmiko.send_config config_file=salt://config.txt salt '*' netmiko.send_config config_file=https://bit.ly/2sgljCB device_type='cisco_ios' ip='1.2.3.4' username='example'
salt.modules.netscaler Module to provide Citrix Netscaler compatibility to Salt (compatible with netscaler 9.2+)
• nsnitro Python module
NOTE: You can install nsnitro using:
pip install nsnitro
configuration This module accepts connection configuration details either as parameters, or as configuration settings in /etc/salt/minion on the relevant minions
netscaler.host: 1.2.3.4 netscaler.user: user netscaler.pass: password
CLI Examples: Calls relying on configuration passed using /etc/salt/minion, grains, or pillars:
salt-call netscaler.server_exists server_name
Calls passing configuration as opts
salt-call netscaler.server_exists server_name netscaler_host=1.2.3.4 netscaler_user=username netscaler_pass=password salt-call netscaler.server_exists server_name netscaler_host=1.2.3.5 netscaler_user=username2 netscaler_pass=password2 salt-call netscaler.server_enable server_name2 netscaler_host=1.2.3.5 salt-call netscaler.server_up server_name3 netscaler_host=1.2.3.6 netscaler_useSSL=False
salt.modules.netscaler.server_add(s_name, s_ip, s_state=None, **connection_args) Add a server Note: The default server state is ENABLED
salt '*' netscaler.server_add 'serverName' 'serverIpAddress' salt '*' netscaler.server_add 'serverName' 'serverIpAddress' 'serverState'
salt.modules.netscaler.server_delete(s_name, **connection_args) Delete a server
salt '*' netscaler.server_delete 'serverName'
salt.modules.netscaler.server_disable(s_name, **connection_args) Disable a server globally
salt '*' netscaler.server_disable 'serverName'
salt.modules.netscaler.server_enable(s_name, **connection_args) Enables a server globally
salt '*' netscaler.server_enable 'serverName'
salt.modules.netscaler.server_enabled(s_name, **connection_args) Check if a server is enabled globally
salt '*' netscaler.server_enabled 'serverName'
salt.modules.netscaler.server_exists(s_name, ip=None, s_state=None, **connection_args) Checks if a server exists
salt '*' netscaler.server_exists 'serverName'
salt.modules.netscaler.server_update(s_name, s_ip, **connection_args) Update a server's attributes
salt '*' netscaler.server_update 'serverName' 'serverIP'
salt.modules.netscaler.service_disable(s_name, s_delay=None, **connection_args) Disable a service
salt '*' netscaler.service_disable 'serviceName' salt '*' netscaler.service_disable 'serviceName' 'delayInSeconds'
salt.modules.netscaler.service_enable(s_name, **connection_args) Enable a service
salt '*' netscaler.service_enable 'serviceName'
salt.modules.netscaler.service_exists(s_name, **connection_args) Checks if a service exists
salt '*' netscaler.service_exists 'serviceName'
salt.modules.netscaler.service_up(s_name, **connection_args) Checks if a service is UP
salt '*' netscaler.service_up 'serviceName'
salt.modules.netscaler.servicegroup_add(sg_name, sg_type='HTTP', **connection_args) Add a new service group If no service type is specified, HTTP will be used.  Most common service types: HTTP, SSL, and SSL_BRIDGE
salt '*' netscaler.servicegroup_add 'serviceGroupName' salt '*' netscaler.servicegroup_add 'serviceGroupName' 'serviceGroupType'
salt.modules.netscaler.servicegroup_delete(sg_name, **connection_args) Delete a new service group
salt '*' netscaler.servicegroup_delete 'serviceGroupName'
salt.modules.netscaler.servicegroup_exists(sg_name, sg_type=None, **connection_args) Checks if a service group exists
salt '*' netscaler.servicegroup_exists 'serviceGroupName'
salt.modules.netscaler.servicegroup_server_add(sg_name, s_name, s_port, **connection_args) Add a server:port member to a servicegroup
salt '*' netscaler.servicegroup_server_add 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.servicegroup_server_delete(sg_name, s_name, s_port, **connection_args) Remove a server:port member from a servicegroup
salt '*' netscaler.servicegroup_server_delete 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.servicegroup_server_disable(sg_name, s_name, s_port, **connection_args) Disable a server:port member of a servicegroup
salt '*' netscaler.servicegroup_server_disable 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.servicegroup_server_enable(sg_name, s_name, s_port, **connection_args) Enable a server:port member of a servicegroup
salt '*' netscaler.servicegroup_server_enable 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.servicegroup_server_exists(sg_name, s_name, s_port=None, **connection_args) Check if a server:port combination is a member of a servicegroup
salt '*' netscaler.servicegroup_server_exists 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.servicegroup_server_up(sg_name, s_name, s_port, **connection_args) Check if a server:port combination is in state UP in a servicegroup
salt '*' netscaler.servicegroup_server_up 'serviceGroupName' 'serverName' 'serverPort'
salt.modules.netscaler.vserver_add(v_name, v_ip, v_port, v_type, **connection_args) Add a new lb vserver
salt '*' netscaler.vserver_add 'vserverName' 'vserverIP' 'vserverPort' 'vserverType' salt '*' netscaler.vserver_add 'alex.patate.chaude.443' '1.2.3.4' '443' 'SSL'
salt.modules.netscaler.vserver_delete(v_name, **connection_args) Delete a lb vserver
salt '*' netscaler.vserver_delete 'vserverName'
salt.modules.netscaler.vserver_exists(v_name, v_ip=None, v_port=None, v_type=None, **connection_args) Checks if a vserver exists
salt '*' netscaler.vserver_exists 'vserverName'
salt.modules.netscaler.vserver_servicegroup_add(v_name, sg_name, **connection_args) Bind a servicegroup to a vserver
salt '*' netscaler.vserver_servicegroup_add 'vserverName' 'serviceGroupName'
salt.modules.netscaler.vserver_servicegroup_delete(v_name, sg_name, **connection_args) Unbind a servicegroup from a vserver
salt '*' netscaler.vserver_servicegroup_delete 'vserverName' 'serviceGroupName'
salt.modules.netscaler.vserver_servicegroup_exists(v_name, sg_name, **connection_args) Checks if a servicegroup is tied to a vserver
salt '*' netscaler.vserver_servicegroup_exists 'vserverName' 'serviceGroupName'
salt.modules.netscaler.vserver_sslcert_add(v_name, sc_name, **connection_args) Binds a SSL certificate to a vserver
salt '*' netscaler.vserver_sslcert_add 'vserverName' 'sslCertificateName'
salt.modules.netscaler.vserver_sslcert_delete(v_name, sc_name, **connection_args) Unbinds a SSL certificate from a vserver
salt '*' netscaler.vserver_sslcert_delete 'vserverName' 'sslCertificateName'
salt.modules.netscaler.vserver_sslcert_exists(v_name, sc_name, **connection_args) Checks if a SSL certificate is tied to a vserver
salt '*' netscaler.vserver_sslcert_exists 'vserverName' 'sslCertificateName'
salt.modules.network Module for gathering and managing network information
salt.modules.network.active_tcp() Return a dict containing information on all of the running TCP connections (currently linux and solaris only)
Changed in version 2015.8.4: Added support for SunOS
salt '*' network.active_tcp
salt.modules.network.arp() Return the arp table from the minion
Changed in version 2015.8.0: Added support for SunOS
salt '*' network.arp
salt.modules.network.calc_net(ip_addr, netmask=None) Returns the CIDR of a subnet based on an IP address (CIDR notation supported) and optional netmask.
salt '*' network.calc_net 172.17.0.5 255.255.255.240 salt '*' network.calc_net 2a02:f6e:a000:80:84d8:8332:7866:4e07/64
salt.modules.network.connect(host, port=None, **kwargs) Test connectivity to a host using a particular port from the minion.
salt '*' network.connect archlinux.org 80
salt '*' network.connect archlinux.org 80 timeout=3
salt '*' network.connect archlinux.org 80 timeout=3 family=ipv4
salt '*' network.connect google-public-dns-a.google.com port=53 proto=udp timeout=3
salt.modules.network.convert_cidr(cidr) returns the network address, subnet mask and broadcast address of a cidr address
salt '*' network.convert_cidr 172.31.0.0/16
salt.modules.network.default_route(family=None) Return default route(s) from routing table
Changed in version 2015.8.0: Added support for SunOS (Solaris 10, Illumos, SmartOS)
salt '*' network.default_route
salt.modules.network.dig(host) Performs a DNS lookup with dig
salt '*' network.dig archlinux.org
salt.modules.network.fqdns() Return all known FQDNs for the system by enumerating all interfaces and then trying to reverse resolve them (excluding 'lo' interface).
salt.modules.network.get_bufsize(iface) Return network buffer sizes as a dict (currently linux only)
salt '*' network.get_bufsize eth0
salt.modules.network.get_fqdn() Get fully qualified domain name
salt '*' network.get_fqdn
salt.modules.network.get_hostname() Get hostname
salt '*' network.get_hostname
salt.modules.network.get_route(ip) Return routing information for given destination ip
Changed in version 2015.8.0: Added support for SunOS (Solaris 10, Illumos, SmartOS) Added support for OpenBSD
salt '*' network.get_route 10.10.10.10
salt.modules.network.hw_addr(iface) Return the hardware address (a.k.a. MAC address) for a given interface
salt '*' network.hw_addr eth0
salt.modules.network.hwaddr(iface) This function is an alias of hw_addr. Return the hardware address (a.k.a. MAC address) for a given interface
salt.modules.network.ifacestartswith(cidr) Retrieve the interface name from a specific CIDR
salt '*' network.ifacestartswith 10.0
salt.modules.network.in_subnet(cidr) Returns True if host is within specified subnet, otherwise False.
salt '*' network.in_subnet 10.0.0.0/16
salt.modules.network.interface(iface) Return the inet address for a given interface
salt '*' network.interface eth0
salt.modules.network.interface_ip(iface) Return the inet address for a given interface
salt '*' network.interface_ip eth0
salt.modules.network.interfaces() Return a dictionary of information about all the interfaces on the minion
salt.modules.network.ip_addrs(interface=None, include_loopback=False, cidr=None, type=None) Returns a list of IPv4 addresses assigned to the host. 127.0.0.1 is ignored, unless 'include_loopback=True' is indicated. If 'interface' is provided, then only IP addresses from that interface will be returned.  Providing a CIDR via 'cidr="10.0.0.0/8"' will return only the addresses which are within that subnet. If 'type' is 'public', then only public addresses will be returned. Ditto for 'type'='private'.
Changed in version 3001: interface can now be a single interface name or a list of interfaces. Globbing is also supported.
salt '*' network.ip_addrs
salt.modules.network.ip_addrs6(interface=None, include_loopback=False, cidr=None) Returns a list of IPv6 addresses assigned to the host. ::1 is ignored, unless 'include_loopback=True' is indicated. If 'interface' is provided, then only IP addresses from that interface will be returned.  Providing a CIDR via 'cidr="2000::/3"' will return only the addresses which are within that subnet.
salt '*' network.ip_addrs6
salt.modules.network.ip_in_subnet(ip_addr, cidr) Returns True if given IP is within specified subnet, otherwise False.
salt '*' network.ip_in_subnet 172.17.0.4 172.16.0.0/12
salt.modules.network.ip_networks(interface=None, include_loopback=False, verbose=False) New in version 3001.
Returns a list of IPv4 networks to which the minion belongs.
interface Restrict results to the specified interface(s). This value can be either a single interface name or a list of interfaces. Globbing is also supported.
salt '*' network.list_networks salt '*' network.list_networks interface=docker0 salt '*' network.list_networks interface=docker0,enp* salt '*' network.list_networks interface=eth*
salt.modules.network.ip_networks6(interface=None, include_loopback=False, verbose=False) New in version 3001.
Returns a list of IPv6 networks to which the minion belongs.
salt '*' network.list_networks6 salt '*' network.list_networks6 interface=docker0 salt '*' network.list_networks6 interface=docker0,enp* salt '*' network.list_networks6 interface=eth*
salt.modules.network.ipaddrs(interface=None, include_loopback=False, cidr=None, type=None) This function is an alias of ip_addrs. Returns a list of IPv4 addresses assigned to the host. 127.0.0.1 is ignored, unless 'include_loopback=True' is indicated. If 'interface' is provided, then only IP addresses from that interface will be returned.  Providing a CIDR via 'cidr="10.0.0.0/8"' will return only the addresses which are within that subnet. If 'type' is 'public', then only public addresses will be returned. Ditto for 'type'='private'.
salt.modules.network.ipaddrs6(interface=None, include_loopback=False, cidr=None) This function is an alias of ip_addrs6. Returns a list of IPv6 addresses assigned to the host. ::1 is ignored, unless 'include_loopback=True' is indicated. If 'interface' is provided, then only IP addresses from that interface will be returned.  Providing a CIDR via 'cidr="2000::/3"' will return only the addresses which are within that subnet.
salt.modules.network.iphexval(ip) Retrieve the hexadecimal representation of an IP address
salt '*' network.iphexval 10.0.0.1
salt.modules.network.is_loopback(ip_addr) Check if the given IP address is a loopback address
Changed in version 2015.8.0: IPv6 support
salt '*' network.is_loopback 127.0.0.1
salt.modules.network.is_private(ip_addr) Check if the given IP address is a private address
salt '*' network.is_private 10.0.0.3
salt.modules.network.mod_bufsize(iface, *args, **kwargs) Modify network interface buffers (currently linux only)
salt '*' network.mod_bufsize tx=<val> rx=<val> rx-mini=<val> rx-jumbo=<val>
salt.modules.network.mod_hostname(hostname) Modify hostname
salt '*' network.mod_hostname master.saltstack.com
salt.modules.network.netstat() Return information on open ports and states
NOTE: On BSD minions, the output contains PID info (where available) for each netstat entry, fetched from sockstat/fstat output.
Changed in version 2014.1.4: Added support for OpenBSD, FreeBSD, and NetBSD
salt '*' network.netstat
salt.modules.network.ping(host, timeout=False, return_boolean=False) Performs an ICMP ping to a host
salt '*' network.ping archlinux.org
Return a True or False instead of ping output.
salt '*' network.ping archlinux.org return_boolean=True
Set the time to wait for a response in seconds.
salt '*' network.ping archlinux.org timeout=3
salt.modules.network.reverse_ip(ip_addr) Returns the reversed IP address
salt '*' network.reverse_ip 172.17.0.4
salt.modules.network.routes(family=None) Return currently configured routes from routing table
salt '*' network.routes
salt.modules.network.subnets(interfaces=None) Returns a list of IPv4 subnets to which the host belongs
salt '*' network.subnets salt '*' network.subnets interfaces=eth1
salt.modules.network.subnets6() Returns a list of IPv6 subnets to which the host belongs
salt '*' network.subnets
salt.modules.network.traceroute(host) Performs a traceroute to a 3rd party host
salt '*' network.traceroute archlinux.org
salt.modules.network.wol(mac, bcast='255.255.255.255', destport=9) Send Wake On Lan packet to a host
salt '*' network.wol 08-00-27-13-69-77 salt '*' network.wol 080027136977 255.255.255.255 7 salt '*' network.wol 08:00:27:13:69:77 255.255.255.255 7
salt.modules.neutron Module for handling OpenStack Neutron calls
• neutronclient Python module
keystone.user: 'admin' keystone.password: 'password' keystone.tenant: 'admin' keystone.auth_url: 'http://127.0.0.1:5000/v2.0/' keystone.region_name: 'RegionOne' keystone.service_type: 'network'
openstack1: keystone.user: 'admin' keystone.password: 'password' keystone.tenant: 'admin' keystone.auth_url: 'http://127.0.0.1:5000/v2.0/' keystone.region_name: 'RegionOne' keystone.service_type: 'network'
openstack2: keystone.user: 'admin' keystone.password: 'password' keystone.tenant: 'admin' keystone.auth_url: 'http://127.0.0.2:5000/v2.0/' keystone.region_name: 'RegionOne' keystone.service_type: 'network'
With this configuration in place, any of the neutron functions can make use of a configuration profile by declaring it explicitly. For example:
salt '*' neutron.network_list profile=openstack1
To use keystoneauth1 instead of keystoneclient, include the use_keystoneauth option in the pillar or minion config.
NOTE: this is required to use keystone v3 as for authentication.
keystone.user: admin keystone.password: verybadpass keystone.tenant: admin keystone.auth_url: 'http://127.0.0.1:5000/v3/' keystone.region_name: 'RegionOne' keystone.service_type: 'network' keystone.use_keystoneauth: true keystone.verify: '/path/to/custom/certs/ca-bundle.crt'
Note: by default the neutron module will attempt to verify its connection utilizing the system certificates. If you need to verify against another bundle of CA certificates or want to skip verification altogether you will need to specify the verify option. You can specify True or False to verify (or not) against system certificates, a path to a bundle or CA certs to check against, or None to allow keystoneauth to search for the certificates on its own.(defaults to True)
salt.modules.neutron.add_gateway_router(router, ext_network, profile=None) Adds an external network gateway to the specified router
salt '*' neutron.add_gateway_router router-name ext-network-name
• router -- ID or name of the router
• ext_network -- ID or name of the external network the gateway
• profile -- Profile to build on (Optional)
Returns Added Gateway router information
salt.modules.neutron.add_interface_router(router, subnet, profile=None) Adds an internal network interface to the specified router
salt '*' neutron.add_interface_router router-name subnet-name
• subnet -- ID or name of the subnet
Returns Added interface information
salt.modules.neutron.create_firewall_rule(protocol, action, profile=None, **kwargs) Creates a new firewall rule
salt '*' neutron.create_firewall_rule protocol action tenant_id=TENANT_ID name=NAME description=DESCRIPTION ip_version=IP_VERSION source_ip_address=SOURCE_IP_ADDRESS destination_ip_address=DESTINATION_IP_ADDRESS source_port=SOURCE_PORT destination_port=DESTINATION_PORT shared=SHARED enabled=ENABLED
• protocol -- Protocol for the firewall rule, choose "tcp","udp","icmp" or "None".
• action -- Action for the firewall rule, choose "allow" or "deny".
• tenant_id -- The owner tenant ID. (Optional)
• name -- Name for the firewall rule. (Optional)
• description -- Description for the firewall rule. (Optional)
• ip_version -- IP protocol version, default: 4. (Optional)
• source_ip_address -- Source IP address or subnet. (Optional)
• destination_ip_address -- Destination IP address or subnet. (Optional)
• source_port -- Source port (integer in [1, 65535] or range in a:b). (Optional)
• destination_port -- Destination port (integer in [1, 65535] or range in a:b). (Optional)
• shared -- Set shared to True, default: False. (Optional)
• enabled -- To enable this rule, default: True. (Optional)
salt.modules.neutron.create_floatingip(floating_network, port=None, profile=None) Creates a new floatingIP
salt '*' neutron.create_floatingip network-name port-name
• floating_network -- Network name or ID to allocate floatingIP from
• port -- Of the port to be associated with the floatingIP (Optional)
Returns Created floatingIP information
salt.modules.neutron.create_ikepolicy(name, profile=None, **kwargs) Creates a new IKEPolicy
salt '*' neutron.create_ikepolicy ikepolicy-name phase1_negotiation_mode=main auth_algorithm=sha1 encryption_algorithm=aes-128 pfs=group5
• name -- Name of the IKE policy
• phase1_negotiation_mode -- IKE Phase1 negotiation mode in lowercase, default: main (Optional)
• auth_algorithm -- Authentication algorithm in lowercase, default: sha1 (Optional)
• encryption_algorithm -- Encryption algorithm in lowercase.  default:aes-128 (Optional)
• pfs -- Prefect Forward Security in lowercase, default: group5 (Optional)
• units -- IKE lifetime attribute. default: seconds (Optional)
• value -- IKE lifetime attribute. default: 3600 (Optional)
• ike_version -- IKE version in lowercase, default: v1 (Optional)
• kwargs --
Returns Created IKE policy information
salt.modules.neutron.create_ipsec_site_connection(name, ipsecpolicy, ikepolicy, vpnservice, peer_cidrs, peer_address, peer_id, psk, admin_state_up=True, profile=None, **kwargs) Creates a new IPsecSiteConnection
salt '*' neutron.show_ipsec_site_connection connection-name ipsec-policy-name ikepolicy-name vpnservice-name 192.168.XXX.XXX/24 192.168.XXX.XXX 192.168.XXX.XXX secret
• name -- Set friendly name for the connection
• ipsecpolicy -- IPSec policy ID or name associated with this connection
• ikepolicy -- IKE policy ID or name associated with this connection
• vpnservice -- VPN service instance ID or name associated with this connection
• peer_cidrs -- Remote subnet(s) in CIDR format
• peer_address -- Peer gateway public IPv4/IPv6 address or FQDN
• peer_id -- Peer router identity for authentication Can be IPv4/IPv6 address, e-mail address, key id, or FQDN
• psk -- Pre-shared key string
• initiator -- Initiator state in lowercase, default:bi-directional
• admin_state_up -- Set admin state up to true or false, default: True (Optional)
• mtu -- size for the connection, default:1500 (Optional)
• dpd_action -- Dead Peer Detection attribute: hold/clear/disabled/ restart/restart-by-peer (Optional)
• dpd_interval -- Dead Peer Detection attribute (Optional)
• dpd_timeout -- Dead Peer Detection attribute (Optional)
Returns Created IPSec site connection information
salt.modules.neutron.create_ipsecpolicy(name, profile=None, **kwargs) Creates a new IPsecPolicy
salt '*' neutron.create_ipsecpolicy ipsecpolicy-name transform_protocol=esp auth_algorithm=sha1 encapsulation_mode=tunnel encryption_algorithm=aes-128
• name -- Name of the IPSec policy
• transform_protocol -- Transform protocol in lowercase, default: esp (Optional)
• encapsulation_mode -- Encapsulation mode in lowercase, default: tunnel (Optional)
• encryption_algorithm -- Encryption algorithm in lowercase, default:aes-128 (Optional)
• units -- IPSec lifetime attribute. default: seconds (Optional)
• value -- IPSec lifetime attribute. default: 3600 (Optional)
Returns Created IPSec policy information
salt.modules.neutron.create_network(name, router_ext=None, admin_state_up=True, network_type=None, physical_network=None, segmentation_id=None, shared=None, profile=None) Creates a new network
salt '*' neutron.create_network network-name salt '*' neutron.create_network network-name profile=openstack1
• name -- Name of network to create
• admin_state_up -- should the state of the network be up? default: True (Optional)
• router_ext -- True then if create the external network (Optional)
• network_type -- the Type of network that the provider is such as GRE, VXLAN, VLAN, FLAT, or LOCAL (Optional)
• physical_network -- the name of the physical network as neutron knows it (Optional)
• segmentation_id -- the vlan id or GRE id (Optional)
• shared -- is the network shared or not (Optional)
Returns Created network information
salt.modules.neutron.create_port(name, network, device_id=None, admin_state_up=True, profile=None) Creates a new port
salt '*' neutron.create_port network-name port-name
• name -- Name of port to create
• network -- Network name or ID
• device_id -- ID of device (Optional)
• admin_state_up -- Set admin state up to true or false, default: true (Optional)
Returns Created port information
salt.modules.neutron.create_router(name, ext_network=None, admin_state_up=True, profile=None) Creates a new router
salt '*' neutron.create_router new-router-name
• name -- Name of router to create (must be first)
• ext_network -- ID or name of the external for the gateway (Optional)
• admin_state_up -- Set admin state up to true or false, default:true (Optional)
Returns Created router information
salt.modules.neutron.create_security_group(name=None, description=None, profile=None) Creates a new security group
salt '*' neutron.create_security_group security-group-name                 description='Security group for servers'
• name -- Name of security group (Optional)
• description -- Description of security group (Optional)
Returns Created security group information
salt.modules.neutron.create_security_group_rule(security_group, remote_group_id=None, direction='ingress', protocol=None, port_range_min=None, port_range_max=None, ethertype='IPv4', profile=None) Creates a new security group rule
salt '*' neutron.show_security_group_rule security-group-rule-id
• security_group -- Security group name or ID to add rule
• remote_group_id -- Remote security group name or ID to apply rule (Optional)
• direction -- Direction of traffic: ingress/egress, default: ingress (Optional)
• protocol -- Protocol of packet: null/icmp/tcp/udp, default: null (Optional)
• port_range_min -- Starting port range (Optional)
• port_range_max -- Ending port range (Optional)
• ethertype -- IPv4/IPv6, default: IPv4 (Optional)
Returns Created security group rule information
salt.modules.neutron.create_subnet(network, cidr, name=None, ip_version=4, profile=None) Creates a new subnet
salt '*' neutron.create_subnet network-name 192.168.1.0/24
• network -- Network ID or name this subnet belongs to
• cidr -- CIDR of subnet to create (Ex. '192.168.1.0/24')
• name -- Name of the subnet to create (Optional)
• ip_version -- Version to use, default is 4(IPv4) (Optional)
Returns Created subnet information
salt.modules.neutron.create_vpnservice(subnet, router, name, admin_state_up=True, profile=None) Creates a new VPN service
salt '*' neutron.create_vpnservice router-name name
• subnet -- Subnet unique identifier for the VPN service deployment
• router -- Router unique identifier for the VPN service
• name -- Set a name for the VPN service
• admin_state_up -- Set admin state up to true or false, default:True (Optional)
Returns Created VPN service information
salt.modules.neutron.delete_firewall_rule(firewall_rule, profile=None) Deletes the specified firewall_rule
salt '*' neutron.delete_firewall_rule firewall-rule
• firewall_rule -- ID or name of firewall rule to delete
Returns True(Succeed) or False
salt.modules.neutron.delete_floatingip(floatingip_id, profile=None) Deletes the specified floating IP
salt '*' neutron.delete_floatingip floatingip-id
• floatingip_id -- ID of floatingIP to delete
salt.modules.neutron.delete_ikepolicy(ikepolicy, profile=None) Deletes the specified IKEPolicy
salt '*' neutron.delete_ikepolicy ikepolicy-name
• ikepolicy -- ID or name of IKE policy to delete
salt.modules.neutron.delete_ipsec_site_connection(ipsec_site_connection, profile=None) Deletes the specified IPsecSiteConnection
salt '*' neutron.delete_ipsec_site_connection connection-name
• ipsec_site_connection -- ID or name of ipsec site connection to delete
salt.modules.neutron.delete_ipsecpolicy(ipsecpolicy, profile=None) Deletes the specified IPsecPolicy
salt '*' neutron.delete_ipsecpolicy ipsecpolicy-name
• ipsecpolicy -- ID or name of IPSec policy to delete
salt.modules.neutron.delete_network(network, profile=None) Deletes the specified network
salt '*' neutron.delete_network network-name salt '*' neutron.delete_network network-name profile=openstack1
• network -- ID or name of network to delete
salt.modules.neutron.delete_port(port, profile=None) Deletes the specified port
salt '*' neutron.delete_network port-name salt '*' neutron.delete_network port-name profile=openstack1
• port -- port name or ID
salt.modules.neutron.delete_quota(tenant_id, profile=None) Delete the specified tenant's quota value
salt '*' neutron.update_quota tenant-id salt '*' neutron.update_quota tenant-id profile=openstack1
• tenant_id -- ID of tenant to quota delete
Returns True(Delete succeed) or False(Delete failed)
salt.modules.neutron.delete_router(router, profile=None) Delete the specified router
salt '*' neutron.delete_router router-name
• router -- ID or name of router to delete
salt.modules.neutron.delete_security_group(security_group, profile=None) Deletes the specified security group
salt '*' neutron.delete_security_group security-group-name
• security_group -- ID or name of security group to delete
salt.modules.neutron.delete_security_group_rule(security_group_rule_id, profile=None) Deletes the specified security group rule
salt '*' neutron.delete_security_group_rule security-group-rule-id
• security_group_rule_id -- ID of security group rule to delete
salt.modules.neutron.delete_subnet(subnet, profile=None) Deletes the specified subnet
salt '*' neutron.delete_subnet subnet-name salt '*' neutron.delete_subnet subnet-name profile=openstack1
• subnet -- ID or name of subnet to delete
salt.modules.neutron.delete_vpnservice(vpnservice, profile=None) Deletes the specified VPN service
salt '*' neutron.delete_vpnservice vpnservice-name
• vpnservice -- ID or name of vpn service to delete
salt.modules.neutron.get_quotas_tenant(profile=None) Fetches tenant info in server's context for following quota operation
salt '*' neutron.get_quotas_tenant salt '*' neutron.get_quotas_tenant profile=openstack1
Parameters profile -- Profile to build on (Optional)
Returns Quotas information
salt.modules.neutron.list_agents(profile=None) List agents.
salt '*' neutron.list_agents
Returns agents message.
salt.modules.neutron.list_extensions(profile=None) Fetches a list of all extensions on server side
salt '*' neutron.list_extensions salt '*' neutron.list_extensions profile=openstack1
Returns List of extensions
salt.modules.neutron.list_firewall_rules(profile=None) Fetches a list of all firewall rules for a tenant
salt '*' neutron.list_firewall_rules
Returns List of firewall rules
salt.modules.neutron.list_firewalls(profile=None) Fetches a list of all firewalls for a tenant
salt '*' neutron.list_firewalls
Returns List of firewalls
salt.modules.neutron.list_floatingips(profile=None) Fetch a list of all floatingIPs for a tenant
salt '*' neutron.list_floatingips salt '*' neutron.list_floatingips profile=openstack1
Returns List of floatingIP
salt.modules.neutron.list_ikepolicies(profile=None) Fetches a list of all configured IKEPolicies for a tenant
salt '*' neutron.list_ikepolicies salt '*' neutron.list_ikepolicies profile=openstack1
Returns List of IKE policy
salt.modules.neutron.list_ipsec_site_connections(profile=None) Fetches all configured IPsec Site Connections for a tenant
salt '*' neutron.list_ipsec_site_connections salt '*' neutron.list_ipsec_site_connections profile=openstack1
Returns List of IPSec site connection
salt.modules.neutron.list_ipsecpolicies(profile=None) Fetches a list of all configured IPsecPolicies for a tenant
salt '*' neutron.list_ipsecpolicies ipsecpolicy-name salt '*' neutron.list_ipsecpolicies ipsecpolicy-name profile=openstack1
Returns List of IPSec policy
salt.modules.neutron.list_l3_agent_hosting_routers(router, profile=None) List L3 agents hosting a router.
salt '*' neutron.list_l3_agent_hosting_routers router
:param router:router name or ID to query.  :param profile: Profile to build on (Optional) :return: L3 agents message.
salt.modules.neutron.list_networks(profile=None) Fetches a list of all networks for a tenant
salt '*' neutron.list_networks salt '*' neutron.list_networks profile=openstack1
Returns List of network
salt.modules.neutron.list_ports(profile=None) Fetches a list of all networks for a tenant
salt '*' neutron.list_ports salt '*' neutron.list_ports profile=openstack1
Returns List of port
salt.modules.neutron.list_quotas(profile=None) Fetches all tenants quotas
salt '*' neutron.list_quotas salt '*' neutron.list_quotas profile=openstack1
Returns List of quotas
salt.modules.neutron.list_routers(profile=None) Fetches a list of all routers for a tenant
salt '*' neutron.list_routers salt '*' neutron.list_routers profile=openstack1
Returns List of router
salt.modules.neutron.list_security_group_rules(profile=None) Fetches a list of all security group rules for a tenant
salt '*' neutron.list_security_group_rules salt '*' neutron.list_security_group_rules profile=openstack1
Returns List of security group rule
salt.modules.neutron.list_security_groups(profile=None) Fetches a list of all security groups for a tenant
salt '*' neutron.list_security_groups salt '*' neutron.list_security_groups profile=openstack1
Returns List of security group
salt.modules.neutron.list_subnets(profile=None) Fetches a list of all networks for a tenant
salt '*' neutron.list_subnets salt '*' neutron.list_subnets profile=openstack1
Returns List of subnet
salt.modules.neutron.list_vpnservices(retrieve_all=True, profile=None, **kwargs) Fetches a list of all configured VPN services for a tenant
salt '*' neutron.list_vpnservices
• retrieve_all -- True or False, default: True (Optional)
Returns List of VPN service
salt.modules.neutron.remove_gateway_router(router, profile=None) Removes an external network gateway from the specified router
salt '*' neutron.remove_gateway_router router-name
• router -- ID or name of router
salt.modules.neutron.remove_interface_router(router, subnet, profile=None) Removes an internal network interface from the specified router
salt '*' neutron.remove_interface_router router-name subnet-name
salt.modules.neutron.show_firewall(firewall, profile=None) Fetches information of a specific firewall rule
salt '*' neutron.show_firewall firewall
• firewall -- ID or name of firewall to look up
Returns firewall information
salt.modules.neutron.show_firewall_rule(firewall_rule, profile=None) Fetches information of a specific firewall rule
salt '*' neutron.show_firewall_rule firewall-rule-name
• ipsecpolicy -- ID or name of firewall rule to look up
Returns firewall rule information
salt.modules.neutron.show_floatingip(floatingip_id, profile=None) Fetches information of a certain floatingIP
salt '*' neutron.show_floatingip floatingip-id
• floatingip_id -- ID of floatingIP to look up
Returns Floating IP information
salt.modules.neutron.show_ikepolicy(ikepolicy, profile=None) Fetches information of a specific IKEPolicy
salt '*' neutron.show_ikepolicy ikepolicy-name
• ikepolicy -- ID or name of ikepolicy to look up
Returns IKE policy information
salt.modules.neutron.show_ipsec_site_connection(ipsec_site_connection, profile=None) Fetches information of a specific IPsecSiteConnection
salt '*' neutron.show_ipsec_site_connection connection-name
• ipsec_site_connection -- ID or name of ipsec site connection to look up
Returns IPSec site connection information
salt.modules.neutron.show_ipsecpolicy(ipsecpolicy, profile=None) Fetches information of a specific IPsecPolicy
salt '*' neutron.show_ipsecpolicy ipsecpolicy-name
• ipsecpolicy -- ID or name of IPSec policy to look up
Returns IPSec policy information
salt.modules.neutron.show_network(network, profile=None) Fetches information of a certain network
salt '*' neutron.show_network network-name salt '*' neutron.show_network network-name profile=openstack1
• network -- ID or name of network to look up
Returns Network information
salt.modules.neutron.show_port(port, profile=None) Fetches information of a certain port
salt '*' neutron.show_port port-id salt '*' neutron.show_port port-id profile=openstack1
• port -- ID or name of port to look up
Returns Port information
salt.modules.neutron.show_quota(tenant_id, profile=None) Fetches information of a certain tenant's quotas
salt '*' neutron.show_quota tenant-id salt '*' neutron.show_quota tenant-id profile=openstack1
• tenant_id -- ID of tenant
Returns Quota information
salt.modules.neutron.show_router(router, profile=None) Fetches information of a certain router
salt '*' neutron.show_router router-name
• router -- ID or name of router to look up
Returns Router information
salt.modules.neutron.show_security_group(security_group, profile=None) Fetches information of a certain security group
salt '*' neutron.show_security_group security-group-name
• security_group -- ID or name of security group to look up
Returns Security group information
salt.modules.neutron.show_security_group_rule(security_group_rule_id, profile=None) Fetches information of a certain security group rule
• security_group_rule_id -- ID of security group rule to look up
Returns Security group rule information
salt.modules.neutron.show_subnet(subnet, profile=None) Fetches information of a certain subnet
salt '*' neutron.show_subnet subnet-name
• subnet -- ID or name of subnet to look up
Returns Subnet information
salt.modules.neutron.show_vpnservice(vpnservice, profile=None, **kwargs) Fetches information of a specific VPN service
salt '*' neutron.show_vpnservice vpnservice-name
• vpnservice -- ID or name of vpn service to look up
Returns VPN service information
salt.modules.neutron.update_firewall_rule(firewall_rule, protocol=None, action=None, name=None, description=None, ip_version=None, source_ip_address=None, destination_ip_address=None, source_port=None, destination_port=None, shared=None, enabled=None, profile=None) Update a firewall rule
salt '*' neutron.update_firewall_rule firewall_rule protocol=PROTOCOL action=ACTION name=NAME description=DESCRIPTION ip_version=IP_VERSION source_ip_address=SOURCE_IP_ADDRESS destination_ip_address=DESTINATION_IP_ADDRESS source_port=SOURCE_PORT destination_port=DESTINATION_PORT shared=SHARED enabled=ENABLED
• firewall_rule -- ID or name of firewall rule to update.
• protocol -- Protocol for the firewall rule, choose "tcp","udp","icmp" or "None". (Optional)
• action -- Action for the firewall rule, choose "allow" or "deny". (Optional)
salt.modules.neutron.update_floatingip(floatingip_id, port=None, profile=None) Updates a floatingIP
salt '*' neutron.update_floatingip network-name port-name
• floatingip_id -- ID of floatingIP
• port -- ID or name of port, to associate floatingip to None or do not specify to disassociate the floatingip (Optional)
Returns Value of updated floating IP information
salt.modules.neutron.update_network(network, name, profile=None) Updates a network
salt '*' neutron.update_network network-name new-network-name
• network -- ID or name of network to update
• name -- Name of this network
Returns Value of updated network information
salt.modules.neutron.update_port(port, name, admin_state_up=True, profile=None) Updates a port
salt '*' neutron.update_port port-name network-name new-port-name
• port -- Port name or ID
• name -- Name of this port
Returns Value of updated port information
salt.modules.neutron.update_quota(tenant_id, subnet=None, router=None, network=None, floatingip=None, port=None, security_group=None, security_group_rule=None, profile=None) Update a tenant's quota
salt '*' neutron.update_quota tenant-id subnet=40 router=50 network=10 floatingip=30 port=30
• subnet -- Value of subnet quota (Optional)
• router -- Value of router quota (Optional)
• network -- Value of network quota (Optional)
• floatingip -- Value of floatingip quota (Optional)
• port -- Value of port quota (Optional)
• security_group -- Value of security group (Optional)
• security_group_rule -- Value of security group rule (Optional)
Returns Value of updated quota
salt.modules.neutron.update_router(router, name=None, admin_state_up=None, profile=None, **kwargs) Updates a router
salt '*' neutron.update_router router_id name=new-router-name admin_state_up=True
• router -- ID or name of router to update
• name -- Name of this router
Returns Value of updated router information
salt.modules.neutron.update_security_group(security_group, name=None, description=None, profile=None) Updates a security group
salt '*' neutron.update_security_group security-group-name                 new-security-group-name
• security_group -- ID or name of security group to update
• name -- Name of this security group (Optional)
Returns Value of updated security group information
salt.modules.neutron.update_subnet(subnet, name, profile=None) Updates a subnet
salt '*' neutron.update_subnet subnet-name new-subnet-name
• subnet -- ID or name of subnet to update
• name -- Name of this subnet
Returns Value of updated subnet information
salt.modules.neutron.update_vpnservice(vpnservice, desc, profile=None) Updates a VPN service
salt '*' neutron.update_vpnservice vpnservice-name desc='VPN Service1'
• vpnservice -- ID or name of vpn service to update
• desc -- Set a description for the VPN service
Returns Value of updated VPN service information
salt.modules.neutronng Neutron module for interacting with OpenStack Neutron
neutron: cloud: default
neutron: auth: username: admin password: password123 user_domain_name: mydomain project_name: myproject project_domain_name: myproject auth_url: https://example.org:5000/v3 identity_api_version: 3
salt.modules.neutronng.compare_changes(obj, **kwargs) Compare two dicts returning only keys that exist in the first dict and are different in the second one
salt.modules.neutronng.get_openstack_cloud(auth=None) Return an openstack_cloud
salt.modules.neutronng.get_operator_cloud(auth=None) Return an operator_cloud
salt.modules.neutronng.list_networks(auth=None, **kwargs) List networks
filters A Python dictionary of filter conditions to push down
salt '*' neutronng.list_networks salt '*' neutronng.list_networks           filters='{"tenant_id": "1dcac318a83b4610b7a7f7ba01465548"}'
salt.modules.neutronng.list_subnets(auth=None, **kwargs) List subnets
salt '*' neutronng.list_subnets salt '*' neutronng.list_subnets           filters='{"tenant_id": "1dcac318a83b4610b7a7f7ba01465548"}'
salt.modules.neutronng.network_create(auth=None, **kwargs) Create a network
name   Name of the network being created
shared False If True, set the network as shared
admin_state_up True If True, Set the network administrative state to "up"
external False Control whether or not this network is externally accessible
provider An optional Python dictionary of network provider options
project_id The project ID on which this network will be created
salt '*' neutronng.network_create name=network2           shared=True admin_state_up=True external=True
salt '*' neutronng.network_create name=network3           provider='{"network_type": "vlan",                     "segmentation_id": "4010",                     "physical_network": "provider"}'           project_id=1dcac318a83b4610b7a7f7ba01465548
salt.modules.neutronng.network_delete(auth=None, **kwargs) Delete a network
name_or_id Name or ID of the network being deleted
salt '*' neutronng.network_delete name_or_id=network1 salt '*' neutronng.network_delete name_or_id=1dcac318a83b4610b7a7f7ba01465548
salt.modules.neutronng.network_get(auth=None, **kwargs) Get a single network
salt '*' neutronng.network_get name=XLB4