Opened 12 years ago
Closed 12 years ago
#48 closed (fixed)
don't autogenerate a URN for resources which don't provide one
Reported by: | chaos@bbn.com | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | 2012-09-04 client release |
Component: | Clients | Version: | |
Keywords: | v0.2.1 | Cc: | |
Dependencies: |
Description
The code:
for datapath in info['datapaths']: print "datapath=%s" % datapath resource[datapath] = gmoc.Resource( datapath, type = 'datapath', pop = pop, operator = organization, ) print "resource.id=%s" % resource[datapath].id
yields:
datapath=04:4d:00:12:e2:b8:a5:d0 resource.id=urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:12:e2:b8:a5:d0 datapath=04:4d:00:26:f1:3f:3b:00 resource.id=urn:publicid:IDN+gmoc.geni.net+node+04:4d:00:26:f1:3f:3b:00
Resources should be defined in the namespace of the aggregate/campus which owns them, and i think it is a rare case that we will want to put a resource in the gmoc.geni.net namespace. The default should be to throw an error if the caller doesn't provide a URN, not to invent one in the gmoc.geni.net namespace.
Note: See
TracTickets for help on using
tickets.
This code:
now yields:
which is probably fine for now.