git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expose node hrn to the OMF resource controller
[nodemanager.git]
/
plugins
/
omf_resctl.py
diff --git
a/plugins/omf_resctl.py
b/plugins/omf_resctl.py
index
406be09
..
b8b5e16
100644
(file)
--- a/
plugins/omf_resctl.py
+++ b/
plugins/omf_resctl.py
@@
-32,6
+32,11
@@
def GetSlivers(data, conf = None, plc = None):
# xxx might need to clean up more deeply..
return
# xxx might need to clean up more deeply..
return
+ try:
+ node_hrn = data['hrn']
+ except:
+ node_hrn='default # Failed to read hrn from GetSlivers, please upgrade PLCAPI'
+
for sliver in data['slivers']:
name=sliver['name']
for chunk in sliver['attributes']:
for sliver in data['slivers']:
name=sliver['name']
for chunk in sliver['attributes']:
@@
-53,7
+58,7
@@
def GetSlivers(data, conf = None, plc = None):
template_contents=file(template).read()
yaml_contents=template_contents\
.replace('@XMPP_SERVER@',xmpp_server)\
template_contents=file(template).read()
yaml_contents=template_contents\
.replace('@XMPP_SERVER@',xmpp_server)\
- .replace('@NODE_HRN@',
'default # xxx todo in omf-resctl nm plugin'
)\
+ .replace('@NODE_HRN@',
node_hrn
)\
.replace('@SLICE_NAME@',name)
changes=tools.replace_file_with_string(yaml,yaml_contents)
if changes:
.replace('@SLICE_NAME@',name)
changes=tools.replace_file_with_string(yaml,yaml_contents)
if changes: