Commit f97375bd authored by Romain Courteaud's avatar Romain Courteaud

slapos_slap_tool: fix up computer renaming

parent 4090d9c5
...@@ -716,7 +716,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSSlapToolMixin): ...@@ -716,7 +716,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSSlapToolMixin):
[{'recargs': args, 'reckwargs': kwargs, [{'recargs': args, 'reckwargs': kwargs,
'recmethod': 'reportComputeNodeBang'}]) 'recmethod': 'reportComputeNodeBang'}])
def test_compute_nodeBang(self): def test_computerBang(self):
self._makeComplexComputeNode() self._makeComplexComputeNode()
self.compute_node_bang_simulator = tempfile.mkstemp()[1] self.compute_node_bang_simulator = tempfile.mkstemp()[1]
try: try:
...@@ -724,7 +724,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSSlapToolMixin): ...@@ -724,7 +724,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSSlapToolMixin):
self.compute_node.reportComputeNodeBang = Simulator( self.compute_node.reportComputeNodeBang = Simulator(
self.compute_node_bang_simulator, 'reportComputeNodeBang') self.compute_node_bang_simulator, 'reportComputeNodeBang')
error_log = 'Please bang me' error_log = 'Please bang me'
response = self.portal_slap.compute_nodeBang(self.compute_node_id, response = self.portal_slap.computerBang(self.compute_node_id,
error_log) error_log)
self.assertEqual('None', response) self.assertEqual('None', response)
created_at = rfc1123_date(DateTime()) created_at = rfc1123_date(DateTime())
...@@ -2567,14 +2567,14 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin): ...@@ -2567,14 +2567,14 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSSlapToolMixin):
[{'recargs': args, 'reckwargs': kwargs, [{'recargs': args, 'reckwargs': kwargs,
'recmethod': 'reportComputeNodeBang'}]) 'recmethod': 'reportComputeNodeBang'}])
def test_compute_nodeBang(self): def test_computerBang(self):
self.login(self.person_user_id) self.login(self.person_user_id)
self.compute_node_bang_simulator = tempfile.mkstemp()[1] self.compute_node_bang_simulator = tempfile.mkstemp()[1]
try: try:
self.compute_node.reportComputeNodeBang = Simulator( self.compute_node.reportComputeNodeBang = Simulator(
self.compute_node_bang_simulator, 'reportComputeNodeBang') self.compute_node_bang_simulator, 'reportComputeNodeBang')
error_log = 'Please bang me' error_log = 'Please bang me'
response = self.portal_slap.compute_nodeBang(self.compute_node_id, response = self.portal_slap.computerBang(self.compute_node_id,
error_log) error_log)
self.assertEqual('None', response) self.assertEqual('None', response)
created_at = rfc1123_date(DateTime()) created_at = rfc1123_date(DateTime())
......
...@@ -443,7 +443,7 @@ class SlapTool(BaseTool): ...@@ -443,7 +443,7 @@ class SlapTool(BaseTool):
return self.REQUEST.response return self.REQUEST.response
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getComputeNodeInformation') 'getComputerInformation')
getComputerInformation = getFullComputerInformation getComputerInformation = getFullComputerInformation
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
...@@ -767,7 +767,7 @@ class SlapTool(BaseTool): ...@@ -767,7 +767,7 @@ class SlapTool(BaseTool):
return self.REQUEST.response return self.REQUEST.response
@convertToREST @convertToREST
def _compute_nodeBang(self, compute_node_id, message): def _computeNodeBang(self, compute_node_id, message):
""" """
Fire up bung on Compute Node Fire up bung on Compute Node
""" """
...@@ -778,12 +778,12 @@ class SlapTool(BaseTool): ...@@ -778,12 +778,12 @@ class SlapTool(BaseTool):
comment=message) comment=message)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'compute_nodeBang') 'computerBang')
def compute_nodeBang(self, computer_id, message): def computerBang(self, computer_id, message):
""" """
Fire up bang on this Software Instance Fire up bang on this Software Instance
""" """
return self._compute_nodeBang(computer_id, message) return self._computeNodeBang(computer_id, message)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'loadComputerConfigurationFromXML') 'loadComputerConfigurationFromXML')
......
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 to comment