X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcommon%2Fkubernetes_utils.py;h=ee8e8edcd7de2351efae3d45003a430127b94229;hb=ae2fdf6e81192a2a70beebf7c1c1247063e1e4ea;hp=d60c9b23a7ddec052a991e9679b286097f10925e;hpb=5cc6023d88bb6f57cc86957369f5f0516a466c8a;p=yardstick.git diff --git a/yardstick/common/kubernetes_utils.py b/yardstick/common/kubernetes_utils.py index d60c9b23a..ee8e8edcd 100644 --- a/yardstick/common/kubernetes_utils.py +++ b/yardstick/common/kubernetes_utils.py @@ -199,3 +199,9 @@ def get_pod_list(namespace='default'): # pragma: no cover def get_pod_by_name(name): # pragma: no cover pod_list = get_pod_list() return next((n for n in pod_list.items if n.metadata.name.startswith(name)), None) + + +def get_volume_types(): + """Return the "volume" types supported by the current API""" + return [vtype for vtype in client.V1Volume.attribute_map.values() + if vtype != 'name']