Commit 9cf1ac9f by Kálmán Viktor

occi: remove OCCI_ADDR

parent 4c94d47f
...@@ -17,8 +17,6 @@ from common.models import humanize_exception ...@@ -17,8 +17,6 @@ from common.models import humanize_exception
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
OCCI_ADDR = "http://localhost:8080/"
X86_ARCH = ARCHITECTURES[1][0] X86_ARCH = ARCHITECTURES[1][0]
X64_ARCH = ARCHITECTURES[0][0] X64_ARCH = ARCHITECTURES[0][0]
...@@ -217,7 +215,7 @@ class Compute(Resource): ...@@ -217,7 +215,7 @@ class Compute(Resource):
inst = Instance.create(params=params, disks=[], networks=[], inst = Instance.create(params=params, disks=[], networks=[],
req_traits=[], tags=[]) req_traits=[], tags=[])
cls.location = "%svm/%d" % (OCCI_ADDR, inst.pk) cls.location = "/vm/%d" % inst.pk
cls.instance = inst cls.instance = inst
cls.create_links(user, links) cls.create_links(user, links)
...@@ -398,7 +396,7 @@ class Storage(Resource): ...@@ -398,7 +396,7 @@ class Storage(Resource):
disk = Disk.create(**params) disk = Disk.create(**params)
disk.full_clean() disk.full_clean()
cls.location = "%sstorage/%d" % (OCCI_ADDR, disk.pk) cls.location = "/storage/%d" % disk.pk
return cls return cls
def render_location(self): def render_location(self):
...@@ -509,8 +507,7 @@ class StorageLink(Link): ...@@ -509,8 +507,7 @@ class StorageLink(Link):
except: except:
pass pass
cls.location = "%sstoragelink/vm_%s_storage_%s" % (OCCI_ADDR, vm_pk, cls.location = "/storagelink/vm_%s_storage_%s" % (vm_pk, disk_pk)
disk_pk)
return cls return cls
def render_location(self): def render_location(self):
...@@ -673,8 +670,8 @@ class NetworkInterface(Link): ...@@ -673,8 +670,8 @@ class NetworkInterface(Link):
except: except:
pass pass
cls.location = "%slink/networkinterface/vm_%s_network_%s" % ( cls.location = "/link/networkinterface/vm_%s_network_%s" % (vm_pk,
OCCI_ADDR, vm_pk, vlan_vid) vlan_vid)
return cls return cls
def render_location(self): def render_location(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment