diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-11-07 04:44:54 -0600 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-11-07 12:28:42 -0600 |
| commit | 42d0b20ebc5fd7393d250fb72d30d5ce630dc54f (patch) | |
| tree | a127968897fee9a8eb268f07f4b3939b501b4682 /openstackclient/tests/fakes.py | |
| parent | 631ed3c8026e6b4539e7a8bf4adb8d2a7239b36a (diff) | |
| download | python-openstackclient-42d0b20ebc5fd7393d250fb72d30d5ce630dc54f.tar.gz | |
Add --or-show option to user create
The --or-show option is added to create commands for the common case
of needing to ensure an object exists and getting its properties if
it does or creating a new one if it does not exist.
Note that if the object exists, any additional options that would
set values in a newly created object are ignored if the object
exists.
FakeResource needs the __name__ attribute to fall through utils.find_resource.
Prove the concept on v2 user create then propogate once we're happy with it...
Change-Id: I6268566514840c284e6a1d44b409a81d6699ef99
Diffstat (limited to 'openstackclient/tests/fakes.py')
| -rw-r--r-- | openstackclient/tests/fakes.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openstackclient/tests/fakes.py b/openstackclient/tests/fakes.py index abad4cff..3c0b060d 100644 --- a/openstackclient/tests/fakes.py +++ b/openstackclient/tests/fakes.py @@ -210,6 +210,7 @@ class FakeModule(object): class FakeResource(object): def __init__(self, manager, info, loaded=False): + self.__name__ = type(self).__name__ self.manager = manager self._info = info self._add_details(info) |
