salt.states.restconf#
RESTCONF State module for Proxy minions
- codeauthor:
Jamie (Bear) Murphy <jamiemurphyit@gmail.com>
- maturity:
new
- platform:
any
About#
This state module was designed to manage RESTCONF states. This module relies on the RESTCONF proxy module to interface with the devices.
- salt.states.restconf.config_manage(name, path, method, config, init_path=None, init_method='PATCH', init_config=None)#
Ensure a specific value exists at a given path
- name:
(str) The name for this rule
- path:
(str) The RESTCONF path to set / get config
- method:
(str) rest method to use eg GET, PUT, POST, PATCH, DELETE
- config:
(dict) The new value at the given path
- init_path: (optional)
(str) Alternative path incase the path doesnt exist on first pass
- init_method: (optional)
(str) Method to use on alternative path when setting config, default: PATCH
- init_config: (optional)
(dict) The new value at the given init path. This is only needed if you need to supply a different style of data to an init path.
Examples:
do_configure_restconf_endpoint: restconf.config_manage: - name: random_name_here - path: restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=1%2F0%2F3 - config: Cisco-IOS-XE-native:GigabitEthernet: description: interfaceDescription name: "1/0/3"