def _set_metadata(self, volume, sets=10, set_size=3):
        key = "cinder.set_%s_metadatas_%s_times" % (set_size, sets)
        with atomic.ActionTimer(self, key):
            keys = []
            for i in range(sets):
                metadata = {}
                for j in range(set_size):
                    key = self.generate_random_name()
                    keys.append(key)
                    metadata[key] = self.generate_random_name()

                self.clients("cinder").volumes.set_metadata(volume, metadata)
            return keys
Set volume metadata.
dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/cinder/utils.py/CinderScenario._set_metadata