/
usr
/
lib
/
python2.6
/
site-packages
/
cinderclient
/
v2
/
/usr/lib/python2.6/site-packages/cinderclient/v2
mkdir
upload
Name
Size
Mode
Actions
contrib/
-
0755
rm
availability_zones.py
1427
0644
edit
dl
rm
availability_zones.pyc
1596
0644
edit
dl
rm
capabilities.py
1248
0644
edit
dl
rm
capabilities.pyc
1481
0644
edit
dl
rm
cgsnapshots.py
4004
0644
edit
dl
rm
cgsnapshots.pyc
4779
0644
edit
dl
rm
client.py
5268
0644
edit
dl
rm
client.pyc
4334
0644
edit
dl
rm
consistencygroups.py
6043
0644
edit
dl
rm
consistencygroups.pyc
6241
0644
edit
dl
rm
limits.py
2775
0644
edit
dl
rm
limits.pyc
4097
0644
edit
dl
rm
pools.py
2204
0644
edit
dl
rm
pools.pyc
1703
0644
edit
dl
rm
qos_specs.py
4789
0644
edit
dl
rm
qos_specs.pyc
6044
0644
edit
dl
rm
quotas.py
1918
0644
edit
dl
rm
quotas.pyc
2383
0644
edit
dl
rm
quota_classes.py
1571
0644
edit
dl
rm
quota_classes.pyc
1870
0644
edit
dl
rm
services.py
2186
0644
edit
dl
rm
services.pyc
2639
0644
edit
dl
rm
shell.py
82917
0644
edit
dl
rm
shell.pyc
75999
0644
edit
dl
rm
volumes.py
25736
0644
edit
dl
rm
volumes.pyc
28553
0644
edit
dl
rm
volume_backups.py
4051
0644
edit
dl
rm
volume_backups.pyc
4990
0644
edit
dl
rm
volume_backups_restore.py
1574
0644
edit
dl
rm
volume_backups_restore.pyc
1780
0644
edit
dl
rm
volume_encryption_types.py
3703
0644
edit
dl
rm
volume_encryption_types.pyc
4143
0644
edit
dl
rm
volume_snapshots.py
6576
0644
edit
dl
rm
volume_snapshots.pyc
8640
0644
edit
dl
rm
volume_transfers.py
3248
0644
edit
dl
rm
volume_transfers.pyc
4014
0644
edit
dl
rm
volume_types.py
4808
0644
edit
dl
rm
volume_types.pyc
5625
0644
edit
dl
rm
volume_type_access.py
1888
0644
edit
dl
rm
volume_type_access.pyc
2531
0644
edit
dl
rm
__init__.py
694
0644
edit
dl
rm
__init__.pyc
225
0644
edit
dl
rm
Edit:
/usr/lib/python2.6/site-packages/cinderclient/v2/pools.py
(2204B)
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Pools interface (v2 extension)""" import six from cinderclient import base class Pool(base.Resource): NAME_ATTR = 'name' def __repr__(self): return "<Pool: %s>" % self.name class PoolManager(base.Manager): """Manage :class:`Pool` resources.""" resource_class = Pool def list(self, detailed=False): """Lists all :rtype: list of :class:`Pool` """ if detailed is True: pools = self._list("/scheduler-stats/get_pools?detail=True", "pools") # Other than the name, all of the pool data is buried below in # a 'capabilities' dictionary. In order to be consistent with the # get-pools command line, these elements are moved up a level to # be attributes of the pool itself. for pool in pools: if hasattr(pool, 'capabilities'): for k, v in six.iteritems(pool.capabilities): setattr(pool, k, v) # Remove the capabilities dictionary since all of its # elements have been copied up to the containing pool del pool.capabilities return pools else: pools = self._list("/scheduler-stats/get_pools", "pools") # avoid cluttering the basic pool list with capabilities dict for pool in pools: if hasattr(pool, 'capabilities'): del pool.capabilities return pools
Save
cmd:
run