"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "zaqar/storage/mongodb/pools.py" between
zaqar-9.0.0.tar.gz and zaqar-10.0.0.tar.gz

About: OpenStack Zaqar is a multi-tenant cloud messaging and notification service for web and mobile developers.
The "Ussuri" series (latest release).

pools.py  (zaqar-9.0.0):pools.py  (zaqar-10.0.0)
skipping to change at line 118 skipping to change at line 118
options=None): options=None):
options = {} if options is None else options options = {} if options is None else options
try: try:
self._col.update_one({'n': name}, self._col.update_one({'n': name},
{'$set': {'n': name, {'$set': {'n': name,
'w': weight, 'w': weight,
'u': uri, 'u': uri,
'f': flavor, 'f': flavor,
'o': options}}, 'o': options}},
upsert=True) upsert=True)
except mongo_error.DuplicateKeyError as ex: except mongo_error.DuplicateKeyError:
LOG.exception(ex) LOG.exception('Pool "%s" already exists', name)
raise errors.PoolAlreadyExists() raise errors.PoolAlreadyExists()
@utils.raises_conn_error @utils.raises_conn_error
def _exists(self, name): def _exists(self, name):
return self._col.find_one({'n': name}) is not None return self._col.find_one({'n': name}) is not None
@utils.raises_conn_error @utils.raises_conn_error
def _update(self, name, **kwargs): def _update(self, name, **kwargs):
names = ('uri', 'weight', 'flavor', 'options') names = ('uri', 'weight', 'flavor', 'options')
fields = common_utils.fields(kwargs, names, fields = common_utils.fields(kwargs, names,
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)