Skip to content

Navigation Menu

Sign up

added info on bmi and vsi (owner field) - #357

Closed
chechuironman wants to merge 14 commits into
softlayer:master from
chechuironman:master
Closed

chechuironman wants to merge 14 commits into
softlayer:master from
chechuironman:master

Conversation

@chechuironman

@chechuironman chechuironman commented Jun 30, 2014

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread SoftLayer/CLI/modules/server.py Outdated

@sudorandom sudorandom Jun 30, 2014

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You will likely need to use the SoftLayer.utils.lookup helper when accessing that for two reasons:

  • Depending on permissions, not everyone will have access to the billing item information. In that case, this would result in a KeyError exception being thrown here.
  • To be able to cleanly split this into multiple lines to match the 80-character PEP-8 limitation.

@chechuironman chechuironman Jun 30, 2014

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried to change to:
table.add_row(['owner', FormattedItem(
lookup(result, 'billingItem', 'orderItem','order','userRecord','username'),
) or blank()])
But I got this:
NameError: global name 'lookup' is not defined

any idea?

@sudorandom sudorandom Jun 30, 2014

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At the top of every python file, there are imports for external modules.

For example, this imports the SoftLayer.utils module:
https://github.com/sudorandom/softlayer-api-python-client/blob/pep8/SoftLayer/CLI/modules/nas.py#L13.

and this uses it:
https://github.com/sudorandom/softlayer-api-python-client/blob/pep8/SoftLayer/CLI/modules/nas.py#L38

Copy link
Copy Markdown
Contributor

A few of the tests are failing because the fixture and the expected response in those tests should be updated to match. To run these tests, you can use tox. Note that it's okay if it complains about missing python versions. That's why we have this hooked up to Travis-ci.

$ pip install -r test-requirements
$ tox

Thanks for the pull request. Let me know if you need any additional help.

@sudorandom sudorandom Jun 30, 2014

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a trailing comma here to avoid having to modify unrelated lines to add new items?

@chechuironman chechuironman Jun 30, 2014

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mmm sorry Im new in all of this, and not a real developer :(
I tried to install tox with the commands you mentioned before, but I got this:

Could not open requirements file: [Errno 2] No such file or directory: 'test-requirements'
Storing debug log for failure in /Users/chechu/Library/Logs/pip.log

@sudorandom sudorandom Jun 30, 2014

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My fault. tests-requirements.txt is in the tools directory. So it should be pip install -r tools/requirement.txt

Copy link
Copy Markdown
Contributor Author

hey Kevin,

I managed to install it...but I can not run tox :(

chechu chechu

Copy link
Copy Markdown
Contributor Author

Hey Kevin,

Could you check it again...I ́ve already run Tox..not sure if I fixed what you wanted...

Copy link
Copy Markdown
Contributor

I am working with @chechuironman offline on finding these errors.

Copy link
Copy Markdown
Contributor Author

It supposed to be fixed...what should I do to continue with the PR?

Copy link
Copy Markdown
Contributor

These changes are included in #372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /