Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit c3cfc93

Browse files
committed
Merge pull request #144 from schivuk/resizePersist
Added support to persist flavor through resize
2 parents 31e795a + ec2ad36 commit c3cfc93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jumpgate/compute/drivers/sl/servers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def on_post(self, req, resp, tenant_id, instance_id):
126126
flavor_id = int(body['resize'].get('flavorRef'))
127127
for flavor in self.flavors:
128128
if str(flavor_id) == flavor['id']:
129+
vg_client.setTags('{"flavor_id": ' + str(flavor_id) + '}',
130+
id=instance_id)
129131
cci.upgrade(instance_id, cpus=flavor['cpus'],
130132
memory=flavor['ram'] / 1024)
131133
resp.status = 202

0 commit comments

Comments
 (0)