diff --git a/openstack/image/v2/_proxy.py b/openstack/image/v2/_proxy.py index 582025639..00614400f 100644 --- a/openstack/image/v2/_proxy.py +++ b/openstack/image/v2/_proxy.py @@ -113,6 +113,21 @@ class Proxy(proxy.Proxy): # ====== IMAGES ====== + def _make_v2_image_params(self, meta, properties): + ret: dict = {} + for k, v in iter(properties.items()): + if k in _INT_PROPERTIES: + ret[k] = int(v) + elif k in _RAW_PROPERTIES: + ret[k] = v + else: + if v is None: + ret[k] = None + else: + ret[k] = str(v) + ret.update(meta) + return ret + def create_image( self, name, @@ -643,21 +658,6 @@ class Proxy(proxy.Proxy): f"Image creation failed: {e!s}" ) from e - def _make_v2_image_params(self, meta, properties): - ret: dict = {} - for k, v in iter(properties.items()): - if k in _INT_PROPERTIES: - ret[k] = int(v) - elif k in _RAW_PROPERTIES: - ret[k] = v - else: - if v is None: - ret[k] = None - else: - ret[k] = str(v) - ret.update(meta) - return ret - def _upload_image_put( self, name,