Skip to content
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

Amend mactable and mstp port #1

Merged
merged 1 commit into from
May 13, 2017
Merged
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HPE Aruba Switch OS Python REST Client

Implementation of Python REST Client to work with the HPE Aruba OS Switch through it's robust RESTFUL API interface.
Implementation of Python REST Client to work with the HPE Aruba OS Switch through its robust RESTFUL API interface.

To install directly into your python environment please use the **pip install pyarubaaoss** command

Expand Down
4 changes: 2 additions & 2 deletions pyarubaoss/mactable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

def get_mactable(auth):
"""
Function to get list of ipaddresses from Aruba OS switch
Function to get list of mac-addresses from Aruba OS switch
:param auth: AOSSAuth class object returned by pyarubaoss.auth
:return list of ipaddresses
:return list of mac-addresses
:rtype list
"""
headers = {'cookie': auth.cookie}
Expand Down
2 changes: 1 addition & 1 deletion pyarubaoss/mstp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_mstp_port(auth):
:rtype dict
"""
headers = {'cookie': auth.cookie}
url_mstp_port = "http://" + auth.ipaddr + "/rest/v1/mstp/port"
url_mstp_port = "http://" + auth.ipaddr + "/rest/"+auth.version+"/mstp/port"
try:
r = requests.get(url_mstp_port, headers=headers)
mstp_port = json.loads(r.text)['mstp_port_element']
Expand Down