salt.modules.restconf#
Execution module for RESTCONF Proxy minions
- codeauthor:
Jamie (Bear) Murphy <jamiemurphyit@gmail.com>
- maturity:
new
- platform:
any
- salt.modules.restconf.get_data(path)#
Returns an object containing the content of the request path with a GET request. Data returned will contain a dict with at minimum a key of "status" containing the http status code Other keys that should be available error (if http error), body, dict (parsed json to dict)
CLI Example:
salt '*' restconf.get_data restconf/yang-library-version
- salt.modules.restconf.info()#
Returns the RESTCONF capabilities PATH
CLI Example:
salt '*' restconf.info
- salt.modules.restconf.path_check(primary_path, init_path)#
Used to check which path responds with a 200 status Returns an array of True/False and a dict with keys path + path_method + response data, used in states code.
CLI Example:
salt '*' restconf.path_check restconf/yang-library-version/specifc_item restconf/yang-library-version
- salt.modules.restconf.set_data(path, method, dict_payload)#
Sends a post/patch/other type of rest method to a specified path with the specified method with specified payload
CLI Example:
salt '*' restconf.set_data restconf/yang-library-version method=PATCH dict_payload=""