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

zone
: string
name of zone
resource_type
: string
type of resource
kwargs
: string|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

zone
: string
name of zone
key
: string
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.

zone
: string
name of zone
brand
: string
brand name
zonepath
: string
path of zone
force
: boolean
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.

zone
: string
name of zone
template
: string
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.

zone
: string
name of zone

CLI Example:

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

Export the configuration from memory to stable storage.

zone
: string
name of zone
path
: string
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.

zone
: string
name of zone
path
: string
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

zone
: string
name of zone
show_all
: boolean
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

zone
: string
name of zone
resource_type
: string
type of resource
resource_key
: string
key for resource selection
resource_value
: string
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

zone
: string
name of zone
key
: string
name of property
value
: string
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

zone
: string
name of zone
resource_type
: string
type of resource
resource_selector
: string
unique resource identifier
kwargs
: string|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)'