salt.modules.zonecfg

Module for Solaris 10's zonecfg

maintainer

Jorge Schrauwen <sjorge@blackdot.be>

maturity

new

platform

OmniOS,OpenIndiana,SmartOS,OpenSolaris,Solaris 10

depend

salt.modules.file

New in version 2017.7.0.

Warning

Oracle Solaris 11's zonecfg is not supported by this module!

salt.modules.zonecfg.add_resource(zone, resource_type, **kwargs)

Add a resource

zonestring

name of zone

resource_typestring

type of resource

kwargsstring|int|...

resource properties

CLI Example:

salt '*' zonecfg.add_resource tallgeese rctl name=zone.max-locked-memory value='(priv=privileged,limit=33554432,action=deny)'
salt.modules.zonecfg.clear_property(zone, key)

Clear a property

zonestring

name of zone

keystring

name of property

CLI Example:

salt '*' zonecfg.clear_property deathscythe cpu-shares
salt.modules.zonecfg.create(zone, brand, zonepath, force=False)

Create an in-memory configuration for the specified zone.

zonestring

name of zone

brandstring

brand name

zonepathstring

path of zone

forceboolean

overwrite configuration

CLI Example:

salt '*' zonecfg.create deathscythe ipkg /zones/deathscythe
salt.modules.zonecfg.create_from_template(zone, template)

Create an in-memory configuration from a template for the specified zone.

zonestring

name of zone

templatestring

name of template

Warning

existing config will be overwritten!

CLI Example:

salt '*' zonecfg.create_from_template leo tallgeese
salt.modules.zonecfg.delete(zone)

Delete the specified configuration from memory and stable storage.

zonestring

name of zone

CLI Example:

salt '*' zonecfg.delete epyon
salt.modules.zonecfg.export(zone, path=None)

Export the configuration from memory to stable storage.

zonestring

name of zone

pathstring

path of file to export to

CLI Example:

salt '*' zonecfg.export epyon
salt '*' zonecfg.export epyon /zones/epyon.cfg
salt.modules.zonecfg.import_(zone, path)

Import the configuration to memory from stable storage.

zonestring

name of zone

pathstring

path of file to export to

CLI Example:

salt '*' zonecfg.import epyon /zones/epyon.cfg
salt.modules.zonecfg.info(zone, show_all=False)

Display the configuration from memory

zonestring

name of zone

show_allboolean

also include calculated values like capped-cpu, cpu-shares, ...

CLI Example:

salt '*' zonecfg.info tallgeese
salt.modules.zonecfg.remove_resource(zone, resource_type, resource_key, resource_value)

Remove a resource

zonestring

name of zone

resource_typestring

type of resource

resource_keystring

key for resource selection

resource_valuestring

value for resource selection

Note

Set resource_selector to None for resource that do not require one.

CLI Example:

salt '*' zonecfg.remove_resource tallgeese rctl name zone.max-locked-memory
salt.modules.zonecfg.set_property(zone, key, value)

Set a property

zonestring

name of zone

keystring

name of property

valuestring

value of property

CLI Example:

salt '*' zonecfg.set_property deathscythe cpu-shares 100
salt.modules.zonecfg.update_resource(zone, resource_type, resource_selector, **kwargs)

Add a resource

zonestring

name of zone

resource_typestring

type of resource

resource_selectorstring

unique resource identifier

kwargsstring|int|...

resource properties

Note

Set resource_selector to None for resource that do not require one.

CLI Example:

salt '*' zonecfg.update_resource tallgeese rctl name name=zone.max-locked-memory value='(priv=privileged,limit=33554432,action=deny)'