Skip to content

Find resource by name #5

@jamesregis

Description

@jamesregis

We should improve the get_*_by_name by using the builtin API function and introduce the name parameter.
.
For get_volume_by_id, a solution could be :

path = ("/v1/volumes?version={}&generation={}&name={}".format(
 self.cfg["version"], self.cfg["generation"], name))

 query = qw("iaas", "GET", path, headers())["data"]

 if query.volumes:
     return query.volumes[0]
 else:
     return query

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions