diff options
author | gordon chung <gord@live.ca> | 2016-04-07 08:06:35 -0400 |
---|---|---|
committer | gordon chung <gord@live.ca> | 2016-04-07 08:09:27 -0400 |
commit | 0789e5e30ca71b05d893b050a724f3c48421d183 (patch) | |
tree | 939c8380b29ef29c3090543d0c08bf6f7fac2b82 /ceilometermiddleware/swift.py | |
parent | db6dccbc6d0dc4cd3324ff2023b324fbe7b728b9 (diff) | |
download | ceilometermiddleware-0789e5e30ca71b05d893b050a724f3c48421d183.tar.gz |
use path as resource id when missing RESELLER prefix
we don't have an id if RESELLER prefix is not in path. this causes
an id to be autogenerated making each request a completely different
resource id.
this patch changes it so we just default to path as our id if one
cannot be computed.
Change-Id: I5775406a84b5f2ad0f95f366b7deca210d2f8e87
Closes-Bug: #1566940
Diffstat (limited to 'ceilometermiddleware/swift.py')
-rw-r--r-- | ceilometermiddleware/swift.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ceilometermiddleware/swift.py b/ceilometermiddleware/swift.py index 925a879..ba2db38 100644 --- a/ceilometermiddleware/swift.py +++ b/ceilometermiddleware/swift.py @@ -216,7 +216,7 @@ class Swift(object): # build object store details target = cadf_resource.Resource( typeURI='service/storage/object', - id=account.partition(self.reseller_prefix)[2]) + id=account.partition(self.reseller_prefix)[2] or path) target.metadata = resource_metadata target.action = method.lower() |