|
|
|
@ -39,7 +39,7 @@ def get(module, path=None, content=None, fields=None, output='json'):
|
|
|
|
|
|
|
|
|
|
|
|
accept = None
|
|
|
|
accept = None
|
|
|
|
if output == 'xml':
|
|
|
|
if output == 'xml':
|
|
|
|
accept = 'application/yang.data+xml'
|
|
|
|
accept = 'application/yang-data+xml'
|
|
|
|
|
|
|
|
|
|
|
|
connection = Connection(module._socket_path)
|
|
|
|
connection = Connection(module._socket_path)
|
|
|
|
return connection.send_request(None, path=path, method='GET', accept=accept)
|
|
|
|
return connection.send_request(None, path=path, method='GET', accept=accept)
|
|
|
|
@ -51,7 +51,7 @@ def edit_config(module, path=None, content=None, method='GET', format='json'):
|
|
|
|
|
|
|
|
|
|
|
|
content_type = None
|
|
|
|
content_type = None
|
|
|
|
if format == 'xml':
|
|
|
|
if format == 'xml':
|
|
|
|
content_type = 'application/yang.data+xml'
|
|
|
|
content_type = 'application/yang-data+xml'
|
|
|
|
|
|
|
|
|
|
|
|
connection = Connection(module._socket_path)
|
|
|
|
connection = Connection(module._socket_path)
|
|
|
|
return connection.send_request(content, path=path, method=method, content_type=content_type)
|
|
|
|
return connection.send_request(content, path=path, method=method, content_type=content_type)
|
|
|
|
|