restconf_config module (#51971)

* Add restconf_config module

* Try to do the right thing when given partial paths

* Add PATCH

* Delete should not require content

* Non-JSON exceptions need raising, too

* Let ConnectionError objects pass through exec_jsonrpc
This commit is contained in:
Nathaniel Case 2019-03-04 08:27:18 -05:00 committed by GitHub
parent 5cc6a70398
commit d5aabd02ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 196 additions and 12 deletions

View file

@ -232,6 +232,8 @@ class Connection(NetworkConnectionBase):
port = self.get_option('port') or (443 if protocol == 'https' else 80)
self._url = '%s://%s:%s' % (protocol, host, port)
self.queue_message('vvv', "ESTABLISH HTTP(S) CONNECTFOR USER: %s TO %s" %
(self._play_context.remote_user, self._url))
self.httpapi.set_become(self._play_context)
self.httpapi.login(self.get_option('remote_user'), self.get_option('password'))