Skip to content

UnboundLocalError when list_virtualmachines() on newly created api instance #17

@bryan-brancotte

Description

@bryan-brancotte

When doing this

api = Api(config["endpoint"], insecure=True)
api.login(config["username"], config["password"])
for o in api.list_virtualmachines():
    print o

It fails because the api wants to have _deployment_id with a value. As it makes sense to refuse to list all VMs without filtering on the deployment id, could we just remove the default value for parameter deployment_id=None to make it clearer ? Or is it that you want the api to keep track of the previously provided deployment_id (I prefer the first option)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions