salt.modules.suse_ip

The networking module for SUSE based distros

New in version 3005.

salt.modules.suse_ip.apply_network_settings(**settings)

Apply global network configuration.

:paramparam settings:

The network settings to apply

Returns:

The result of service.reload for network service

CLI Example:

salt '*' ip.apply_network_settings
salt.modules.suse_ip.build_interface(iface, iface_type, enabled, **settings)

Build an interface script for a network interface.

:paramparam iface:

The name of the interface to build the configuration for

:paramparam iface_type:
The type of the interface. The following types are possible:
  • eth

  • bond

  • alias

  • clone

  • ipsec

  • dialup

  • bridge

  • slave

  • vlan

  • ipip

  • ib

:paramparam enabled:

Build the interface enabled or disabled

:paramparam settings:

The settings for the interface

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.build_interface eth0 eth <settings>
salt.modules.suse_ip.build_network_settings(**settings)

Build the global network script.

:paramparam settings:

The network settings

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.build_network_settings <settings>
salt.modules.suse_ip.build_routes(iface, **settings)

Build a route script for a network interface.

:paramparam iface:

The name of the interface to build the routes for

:paramparam settings:

The settings for the routes

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.build_routes eth0 <settings>
salt.modules.suse_ip.down(iface, iface_type=None)

Shutdown a network interface

:paramparam iface:

The name of the interface to shutdown

:paramparam iface_type:

The type of the interface If slave is specified, no any action is performing Default is None

Returns:

The result of ifdown command or None if slave iface_type was specified

Return type:

str

CLI Example:

salt '*' ip.down eth0
salt.modules.suse_ip.get_interface(iface)

Return the contents of an interface script

:paramparam iface:

The name of the interface to get settings for

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.get_interface eth0
salt.modules.suse_ip.get_network_settings()

Return the contents of the global network script.

:paramparam iface:

The name of the interface to start up

:paramparam iface_type:

The type of the interface If slave is specified, no any action is performing Default is None

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.get_network_settings
salt.modules.suse_ip.get_routes(iface)

Return the contents of the interface routes script.

:paramparam iface:

The name of the interface to get the routes for

Returns:

A dictionary of file/content

Return type:

dict

CLI Example:

salt '*' ip.get_routes eth0
salt.modules.suse_ip.up(iface, iface_type=None)

Start up a network interface

:paramparam iface:

The name of the interface to start up

:paramparam iface_type:

The type of the interface If slave is specified, no any action is performing Default is None

Returns:

The result of ifup command or None if slave iface_type was specified

Return type:

str

CLI Example:

salt '*' ip.up eth0