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

nxapi_utils password 'getter' #30

Open
scotthereld opened this issue Jul 7, 2017 · 0 comments
Open

nxapi_utils password 'getter' #30

scotthereld opened this issue Jul 7, 2017 · 0 comments

Comments

@scotthereld
Copy link

Below is the list of ‘getters’ in the NXAPI() class:

Test code will 'Succeed' with this Bug in place, as 'username' and 'password' are identical. The 'get_password()' method returns 'self.username' where 'self.password' is expected.

class NXAPI:
'''A better NX-API utility'''
def init(self):
self.target_url = 'http://localhost/ins'
self.username = 'admin'
self.password = ‘admin’
self.timeout = 10


def get_target_url(self):
return self.target_url

def get_username(self):
    return self.username

**def get_password(self):**
    **return self. username**

def get_timeout(self):
    return self.timeout

def get_cmd(self):
    return self.cmd

def get_out_format(self):
    return self.out_format

def get_do_chunk(self):
    return self.do_chunk

def get_sid(self):
    return self.sid

def get_cookie(self):
    return self.cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant