Bases: object
Resource or Resource-Manager constructor. All managed resources and resource-managers inherit from this class.
If not None, identifies a specific resource by ‘name’. The format of the name is resource dependent. Most resources take a single string name, while others use tuples for compound names. refer to each resource for the ‘namevar’ definition
If namevar is None, then the instance is a Resource-Manager (RM). The RM is then used to select specific resources by name using the __getitem__ overload.
activate resource in Junos config the same as the Junos config-mode “activate” command
is this resource configuration active on the Junos device?
RuntimeError: | if invoked on a manager object |
---|
activate resource in Junos config the same as the Junos config-mode “deactivate” command
remove configuration from Junos device the same as the Junos config-mode “delete” command
does this resource configuration exist on the Junos device?
RuntimError: | if invoked on a manager |
---|
is this a new resource? that is, it does not exist on the Junos device when it was initally retrieved
RuntimeError: | if invoked on a manager |
---|
a resource may contain sub-managers for hierarchical oriented resources. this method will return a list of manager names attached to this resource, or :None: if there are not any
proptery from :has: to :should:
performs a ‘deepcopy’ of the property; used to make changes to list, dict type properties
rename resource in Junos configuration the same as the Junos config-mode “rename” command
move the configuration within the Junos hierarcy the same as the Junos config-mode “insert” command
Kvargs: | after=”<name>” before=”<name>” |
---|
write resource configuration stored in :should: back to device
Bases: jnpr.junos.cfg.resource.Resource
[edit system login user <name>]
Bases: jnpr.junos.cfg.resource.Resource
[edit system login user <name> authentication <key-type> <key-value> ]
Adds a new ssh-key to the user authentication. You can provide either the path to the ssh-key file, or the contents of they key (useful for loading the same key on many devices)
Path: | (optional) path to public ssh-key file on the local server, |
---|---|
Key_value: | (optional) the contents of the ssh public key |