Skip to content

Conversation

@hendersonreed
Copy link
Contributor

No description provided.

from . import containers
from . import containerutils
from . import groups
from . import users

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the removal of relative imports here? I was going to suggest adding them in cli_functions.py and then see the opposite here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we were having a weird import error with them - removing it resolved them, and I did a bit of research as to why I was seeing the error but couldn't suss it out.

Down the line once this is closer to merging we can add them back in and work out why they were causing an issue (or maybe the issue won't be reproducible.)

parser.add_argument("-u", "--username", type=str, action="store")
parser.add_argument("-p", "--password", type=str, action="store")
parser.add_argument("-u", "--username", default="admin", type=str, action="store")
parser.add_argument("-p", "--password", default="admin", type=str, action="store")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these defaults just for testing and to be removed before merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's still up for debate - at the moment I think gkit gets used against the dev environment the most, but maybe no default makes more sense, in which case they become required arguments.

user_url = f"_ui/v1/users/?username={username}"
user_resp = client.get(user_url)
return user_resp["data"][0]
if user_resp["data"] is not []:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not user_resp["data"]:

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

Successfully merging this pull request may close these issues.

3 participants