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

Commit

Permalink
Merge pull request #144 from schivuk/resizePersist
Browse files Browse the repository at this point in the history
Added support to persist flavor through resize
  • Loading branch information
jimlindeman committed Jul 31, 2014
2 parents 31e795a + ec2ad36 commit c3cfc93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jumpgate/compute/drivers/sl/servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3cfc93

Please sign in to comment.