Draft VOMS integration using voms_helper lib
[snf-occi] / snfOCCI / registry.py
1 from kamaki.clients.compute import ComputeClient
2 from kamaki.clients.cyclades import CycladesClient
3 from kamaki.config  import Config
4
5 from occi import registry
6 from occi.core_model import Mixin
7 from occi.backend import MixinBackend
8 from occi.extensions.infrastructure import RESOURCE_TEMPLATE, OS_TEMPLATE
9
10 class snfRegistry(registry.NonePersistentRegistry):
11
12     def add_resource(self, key, resource, extras):
13
14         key = resource.kind.location + resource.attributes['occi.core.id']
15         resource.identifier = key
16
17         super(snfRegistry, self).add_resource(key, resource, extras)