X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plstackapi%2Fcore%2Fmodels%2Fslice.py;h=dc2fc63847182d9079782d887e6c896bb2e9e227;hb=9bcbe4f97aefc3e4679bafe1f37ac5e049f56621;hp=027ba10bac08c4f6429f87ec56526d4383b3cc28;hpb=54304c693d7996577ee21729c5bac6fd07a67556;p=plstackapi.git diff --git a/plstackapi/core/models/slice.py b/plstackapi/core/models/slice.py index 027ba10..dc2fc63 100644 --- a/plstackapi/core/models/slice.py +++ b/plstackapi/core/models/slice.py @@ -31,6 +31,9 @@ class Slice(PlCoreBase): tenant = self.driver.create_tenant(**nova_fields) self.tenant_id = tenant.id + # give caller an admin role at the tenant they've created + self.driver.add_user_role(self.caller.user_id, tenant.id, 'admin') + # create network network = self.driver.create_network(self.name) self.network_id = network['id']