From ec2ad3664c2659b3d748fb7761bb5a477822967a Mon Sep 17 00:00:00 2001 From: Harsha Date: Thu, 24 Jul 2014 09:40:47 -0500 Subject: [PATCH] Added support to persist flavor through resize --- jumpgate/compute/drivers/sl/servers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jumpgate/compute/drivers/sl/servers.py b/jumpgate/compute/drivers/sl/servers.py index 8d3b166..bd629d2 100644 --- a/jumpgate/compute/drivers/sl/servers.py +++ b/jumpgate/compute/drivers/sl/servers.py @@ -126,6 +126,8 @@ def on_post(self, req, resp, tenant_id, instance_id): flavor_id = int(body['resize'].get('flavorRef')) for flavor in self.flavors: if str(flavor_id) == flavor['id']: + vg_client.setTags('{"flavor_id": ' + str(flavor_id) + '}', + id=instance_id) cci.upgrade(instance_id, cpus=flavor['cpus'], memory=flavor['ram'] / 1024) resp.status = 202