Skip to content

[For review] - Proposed update to implementation for RESTCONF platforms #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def find_version(*paths):

# package dependencies
install_requires=[
'requests >= 1.15.1',
'requests >= 2.10.0',
'PySocks >= 1.5.6',
'dict2xml',
'f5-icontrol-rest',
'ciscoisesdk'
Expand Down
4 changes: 2 additions & 2 deletions src/rest/connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def __getattribute__(self, name):
# Selector of methods/attributes to pick from abstracted
# Can't use __getattr__ as BaseConnection is abstract and some already
# exists
if name in ['api', 'get', 'post', 'put', 'patch', 'delete',
'connect', 'disconnect', 'connected']:
if name in ['api', 'options', 'head', 'get', 'post', 'put', 'patch',
'delete', 'connect', 'disconnect', 'connected']:
return getattr(self._implementation, name)

# Send the rest to normal __getattribute__
Expand Down
10 changes: 10 additions & 0 deletions src/rest/connector/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ def disconnect(self):

raise NotImplementedError

def options(self, *args, **kwargs):
'''OPTIONS REST Command to retrieve supported methods'''

raise NotImplementedError

def head(self, *args, **kwargs):
'''HEAD REST Command to retrieve header fields'''

raise NotImplementedError

def get(self, *args, **kwargs):
'''GET REST Command to retrieve information from the device'''

Expand Down
Loading