Commit 45ebdd88 authored by Romain Courteaud's avatar Romain Courteaud 🐸

slapos_json_rpc_api: rename api entry points

parent c2a97a98
...@@ -67,19 +67,19 @@ ...@@ -67,19 +67,19 @@
<key> <string>json_form</string> </key> <key> <string>json_form</string> </key>
<value> <value>
<tuple> <tuple>
<string>slapos.put.slapos_jio_api_put_software_instance | SoftwareInstance_updateFromJSON</string> <string>slapos.put.software_instance | SoftwareInstance_updateFromJSON</string>
<string>slapos.put.slapos_jio_api_put_software_installation | SoftwareInstallation_updateFromJSON</string> <string>slapos.put.software_installation | SoftwareInstallation_updateFromJSON</string>
<string>slapos.put.slapos_jio_api_put_compute_node | ComputeNode_updateFromJSON</string> <string>slapos.put.compute_node | ComputeNode_updateFromJSON</string>
<string>slapos.get.slapos_jio_api_get_software_instance | SoftwareInstance_getFromJSON</string> <string>slapos.get.software_instance | SoftwareInstance_getFromJSON</string>
<string>slapos.get.slapos_jio_api_get_compute_node | ComputeNode_getFromJSON</string> <string>slapos.get.compute_node | ComputeNode_getFromJSON</string>
<string>slapos.get.slapos_jio_api_get_software_installation | SoftwareInstallation_getFromJSON</string> <string>slapos.get.software_installation | SoftwareInstallation_getFromJSON</string>
<string>slapos.get.slapos_jio_api_get_software_instance_certificate | SoftwareInstanceCertificateRecord_getFromJSON</string> <string>slapos.get.software_instance_certificate | SoftwareInstanceCertificateRecord_getFromJSON</string>
<string>slapos.post.slapos_jio_api_create_compute_node | jIOWebSection_createComputeNodeFromJSON</string> <string>slapos.post.compute_node | jIOWebSection_createComputeNodeFromJSON</string>
<string>slapos.post.slapos_jio_api_request_software_instance | jIOWebSection_requestSoftwareInstanceFromJSON</string> <string>slapos.post.software_instance | jIOWebSection_requestSoftwareInstanceFromJSON</string>
<string>slapos.post.slapos_jio_api_create_software_installation | jIOWebSection_createSoftwareInstallationFromJSON</string> <string>slapos.post.software_installation | jIOWebSection_createSoftwareInstallationFromJSON</string>
<string>slapos.allDocs.slapos_jio_api_search_compute_node | jIOWebSection_searchComputeNodeFromJSON</string> <string>slapos.allDocs.compute_node | jIOWebSection_searchComputeNodeFromJSON</string>
<string>slapos.allDocs.slapos_jio_api_search_instance | jIOWebSection_searchInstanceFromJSON</string> <string>slapos.allDocs.instance | jIOWebSection_searchInstanceFromJSON</string>
<string>slapos.allDocs.slapos_jio_api_search_software_installation | jIOWebSection_searchSoftwareInstallationFromJSON</string> <string>slapos.allDocs.software_installation | jIOWebSection_searchSoftwareInstallationFromJSON</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>1021.19615.5761.15104</string> </value> <value> <string>1021.45456.10756.3003</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1734001867.68</float> <float>1737129065.46</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -149,7 +149,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -149,7 +149,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
"title": instance.getTitle(), "title": instance.getTitle(),
}) })
response = self.callJsonRpcWebService('slapos.allDocs.slapos_jio_api_search_instance', { response = self.callJsonRpcWebService('slapos.allDocs.instance', {
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
"portal_type": "Software Instance", "portal_type": "Software Instance",
}, self.compute_node_user_id) }, self.compute_node_user_id)
...@@ -174,7 +174,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -174,7 +174,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
# Check Data is correct # Check Data is correct
partition = instance.getAggregateValue(portal_type="Compute Partition") partition = instance.getAggregateValue(portal_type="Compute Partition")
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
'slapos.get.slapos_jio_api_get_software_instance', 'slapos.get.software_instance',
instance_resut_dict["get_parameters"], instance_resut_dict["get_parameters"],
self.compute_node_user_id self.compute_node_user_id
) )
...@@ -232,7 +232,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -232,7 +232,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
}) })
response = self.callJsonRpcWebService('slapos.allDocs.slapos_jio_api_search_software_installation', { response = self.callJsonRpcWebService('slapos.allDocs.software_installation', {
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
"portal_type": "Software Installation", "portal_type": "Software Installation",
}, self.compute_node_user_id) }, self.compute_node_user_id)
...@@ -254,7 +254,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -254,7 +254,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
software = software_list[i] software = software_list[i]
# Get instance as "user" # Get instance as "user"
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_installation", "slapos.get.software_installation",
software_resut_dict["get_parameters"], software_resut_dict["get_parameters"],
self.compute_node_user_id self.compute_node_user_id
) )
...@@ -279,7 +279,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -279,7 +279,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
error_log = 'Please force slapos node rerun' error_log = 'Please force slapos node rerun'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_compute_node", "slapos.put.compute_node",
{ {
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
"portal_type": "Compute Node", "portal_type": "Compute Node",
...@@ -316,7 +316,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -316,7 +316,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
url_string = software_installation.getUrlString() url_string = software_installation.getUrlString()
status_dict = software_installation.getAccessStatus() status_dict = software_installation.getAccessStatus()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_installation", "slapos.get.software_installation",
{ {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": url_string, "software_release_uri": url_string,
...@@ -344,7 +344,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -344,7 +344,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
def test_ComputeNodeAccess_04_destroyedSoftwareRelease_noSoftwareInstallation(self): def test_ComputeNodeAccess_04_destroyedSoftwareRelease_noSoftwareInstallation(self):
software_release_uri = "http://example.org/foo" software_release_uri = "http://example.org/foo"
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_installation", "slapos.put.software_installation",
{ {
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -369,7 +369,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -369,7 +369,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
software_installation = self.start_requested_software_installation software_installation = self.start_requested_software_installation
software_release_uri = software_installation.getUrlString() software_release_uri = software_installation.getUrlString()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_installation", "slapos.put.software_installation",
{ {
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -397,7 +397,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -397,7 +397,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_installation", "slapos.put.software_installation",
{ {
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -427,7 +427,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -427,7 +427,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
software_release_uri = software_installation.getUrlString() software_release_uri = software_installation.getUrlString()
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService("slapos.put.slapos_jio_api_put_software_installation", { response = self.callJsonRpcWebService("slapos.put.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -446,7 +446,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -446,7 +446,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
}) })
self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getStatus(), 200)
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_installation", { response = self.callJsonRpcWebService("slapos.get.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id "compute_node_id": self.compute_node_id
...@@ -475,7 +475,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -475,7 +475,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
software_release_uri = software_installation.getUrlString() software_release_uri = software_installation.getUrlString()
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService("slapos.put.slapos_jio_api_put_software_installation", { response = self.callJsonRpcWebService("slapos.put.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -494,7 +494,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -494,7 +494,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
}) })
self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getStatus(), 200)
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_installation", { response = self.callJsonRpcWebService("slapos.get.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id "compute_node_id": self.compute_node_id
...@@ -523,7 +523,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -523,7 +523,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
software_release_uri = software_installation.getUrlString() software_release_uri = software_installation.getUrlString()
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService("slapos.put.slapos_jio_api_put_software_installation", { response = self.callJsonRpcWebService("slapos.put.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
...@@ -542,7 +542,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin): ...@@ -542,7 +542,7 @@ class TestSlapOSSlapToolComputeNodeAccess(TestSlapOSJsonRpcMixin):
}) })
self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getStatus(), 200)
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_installation", { response = self.callJsonRpcWebService("slapos.get.software_installation", {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"software_release_uri": software_release_uri, "software_release_uri": software_release_uri,
"compute_node_id": self.compute_node_id "compute_node_id": self.compute_node_id
...@@ -568,7 +568,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -568,7 +568,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
def test_InstanceAccess_10_getComputerPartitionCertificate(self): def test_InstanceAccess_10_getComputerPartitionCertificate(self):
self._makeComplexComputeNode(self.project) self._makeComplexComputeNode(self.project)
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_instance_certificate", { response = self.callJsonRpcWebService("slapos.get.software_instance_certificate", {
"portal_type": "Software Instance Certificate Record", "portal_type": "Software Instance Certificate Record",
"reference": self.start_requested_software_instance.getReference(), "reference": self.start_requested_software_instance.getReference(),
}, self.start_requested_software_instance.getUserId()) }, self.start_requested_software_instance.getUserId())
...@@ -601,7 +601,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -601,7 +601,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
"title": instance.getTitle(), "title": instance.getTitle(),
}] }]
response = self.callJsonRpcWebService("slapos.allDocs.slapos_jio_api_search_instance", { response = self.callJsonRpcWebService("slapos.allDocs.instance", {
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
"portal_type": "Software Instance", "portal_type": "Software Instance",
}, instance.getUserId()) }, instance.getUserId())
...@@ -619,7 +619,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -619,7 +619,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Get instance as "user" # Get instance as "user"
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
instance_resut_dict["get_parameters"], instance_resut_dict["get_parameters"],
instance.getUserId() instance.getUserId()
) )
...@@ -663,7 +663,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -663,7 +663,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
instance = self.start_requested_software_instance instance = self.start_requested_software_instance
# Check Slaves # Check Slaves
# XXX It should be the same portal_type # XXX It should be the same portal_type
response = self.callJsonRpcWebService("slapos.allDocs.slapos_jio_api_search_instance", { response = self.callJsonRpcWebService("slapos.allDocs.instance", {
"host_instance_reference": instance.getReference(), "host_instance_reference": instance.getReference(),
"portal_type": "Slave Instance", "portal_type": "Slave Instance",
}, },
...@@ -690,7 +690,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -690,7 +690,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
self.assertEqual(response.getStatus(), 200) self.assertEqual(response.getStatus(), 200)
response = response = self.callJsonRpcWebService( response = response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
shared_instance_list_response["result_list"][0]["get_parameters"], shared_instance_list_response["result_list"][0]["get_parameters"],
instance.getUserId() instance.getUserId()
) )
...@@ -742,7 +742,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -742,7 +742,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": self.start_requested_slave_instance.getReference(), "reference": self.start_requested_slave_instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -780,7 +780,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -780,7 +780,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": self.start_requested_software_instance.getReference(), "reference": self.start_requested_software_instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -809,7 +809,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -809,7 +809,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
error_log = 'The error' error_log = 'The error'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -832,7 +832,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -832,7 +832,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check Data is correct # Check Data is correct
partition = instance.getAggregateValue(portal_type="Compute Partition") partition = instance.getAggregateValue(portal_type="Compute Partition")
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_instance", { response = self.callJsonRpcWebService("slapos.get.software_instance", {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
}, },
...@@ -875,7 +875,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -875,7 +875,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
error_log = 'The error' error_log = 'The error'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -898,7 +898,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -898,7 +898,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check Data is correct # Check Data is correct
partition = instance.getAggregateValue(portal_type="Compute Partition") partition = instance.getAggregateValue(portal_type="Compute Partition")
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_instance", { response = self.callJsonRpcWebService("slapos.get.software_instance", {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
}, },
...@@ -936,7 +936,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -936,7 +936,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Second call # Second call
with PinnedDateTime(self, DateTime('2020/05/20')): with PinnedDateTime(self, DateTime('2020/05/20')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -959,7 +959,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -959,7 +959,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check Data is correct # Check Data is correct
partition = instance.getAggregateValue(portal_type="Compute Partition") partition = instance.getAggregateValue(portal_type="Compute Partition")
response = self.callJsonRpcWebService("slapos.get.slapos_jio_api_get_software_instance", { response = self.callJsonRpcWebService("slapos.get.software_instance", {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
}, },
...@@ -1001,7 +1001,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1001,7 +1001,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
error_log = 'Please force slapos instance rerun' error_log = 'Please force slapos instance rerun'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1030,7 +1030,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1030,7 +1030,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check get return the expected results after # Check get return the expected results after
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
...@@ -1068,7 +1068,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1068,7 +1068,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
new_name = 'new me' new_name = 'new me'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1101,7 +1101,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1101,7 +1101,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1129,7 +1129,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1129,7 +1129,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference() partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_request_software_instance", "slapos.post.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"software_release_uri": "req_release", "software_release_uri": "req_release",
...@@ -1182,7 +1182,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1182,7 +1182,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference() partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_request_software_instance", "slapos.post.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"software_release_uri": "req_release", "software_release_uri": "req_release",
...@@ -1234,7 +1234,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1234,7 +1234,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference() partition_id = instance.getAggregateValue(portal_type='Compute Partition').getReference()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_request_software_instance", "slapos.post.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"software_release_uri": "req_release", "software_release_uri": "req_release",
...@@ -1282,7 +1282,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1282,7 +1282,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
self._makeComplexComputeNode(self.project) self._makeComplexComputeNode(self.project)
instance = self.start_requested_software_instance instance = self.start_requested_software_instance
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1301,7 +1301,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1301,7 +1301,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check get return the expected results after # Check get return the expected results after
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
...@@ -1337,7 +1337,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1337,7 +1337,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
self._makeComplexComputeNode(self.project) self._makeComplexComputeNode(self.project)
instance = self.start_requested_software_instance instance = self.start_requested_software_instance
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1356,7 +1356,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin): ...@@ -1356,7 +1356,7 @@ class TestSlapOSSlapToolInstanceAccess(TestSlapOSJsonRpcMixin):
# Check get return the expected results after # Check get return the expected results after
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
...@@ -1398,7 +1398,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1398,7 +1398,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
error_log = 'Please force slapos node rerun' error_log = 'Please force slapos node rerun'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_compute_node", "slapos.put.compute_node",
{ {
"compute_node_id": self.compute_node_id, "compute_node_id": self.compute_node_id,
"portal_type": "Compute Node", "portal_type": "Compute Node",
...@@ -1429,7 +1429,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1429,7 +1429,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
self._makeComplexComputeNode(self.project, person=self.person, with_slave=with_slave) self._makeComplexComputeNode(self.project, person=self.person, with_slave=with_slave)
instance = self.start_requested_software_instance instance = self.start_requested_software_instance
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
...@@ -1480,7 +1480,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1480,7 +1480,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
error_log = 'Please force slapos instance rerun' error_log = 'Please force slapos instance rerun'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1509,7 +1509,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1509,7 +1509,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
# Check get return the expected results after # Check get return the expected results after
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.get.slapos_jio_api_get_software_instance", "slapos.get.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"reference": instance.getReference(), "reference": instance.getReference(),
...@@ -1547,7 +1547,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1547,7 +1547,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
new_name = 'new me' new_name = 'new me'
with PinnedDateTime(self, DateTime('2020/05/19')): with PinnedDateTime(self, DateTime('2020/05/19')):
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.put.slapos_jio_api_put_software_instance", "slapos.put.software_instance",
{ {
"reference": instance.getReference(), "reference": instance.getReference(),
"portal_type": "Software Instance", "portal_type": "Software Instance",
...@@ -1578,7 +1578,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1578,7 +1578,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
project_reference = self.project.getReference() project_reference = self.project.getReference()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_request_software_instance", "slapos.post.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"project_reference": project_reference, "project_reference": project_reference,
...@@ -1614,7 +1614,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1614,7 +1614,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
project_reference = self.project.getReference() project_reference = self.project.getReference()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_request_software_instance", "slapos.post.software_instance",
{ {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"project_reference": project_reference, "project_reference": project_reference,
...@@ -1655,7 +1655,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1655,7 +1655,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
instance = self.start_requested_software_instance instance = self.start_requested_software_instance
self.login(self.person_user_id) self.login(self.person_user_id)
with TemporaryAlarmScript(self.portal, 'Item_getSubscriptionStatus', "'subscribed'"): with TemporaryAlarmScript(self.portal, 'Item_getSubscriptionStatus', "'subscribed'"):
response = self.callJsonRpcWebService("slapos.post.slapos_jio_api_request_software_instance", { response = self.callJsonRpcWebService("slapos.post.software_instance", {
"portal_type": "Software Instance", "portal_type": "Software Instance",
"software_release_uri": instance.getUrlString(), "software_release_uri": instance.getUrlString(),
"software_type": instance.getSourceReference(), "software_type": instance.getSourceReference(),
...@@ -1699,7 +1699,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin): ...@@ -1699,7 +1699,7 @@ class TestSlapOSSlapToolPersonAccess(TestSlapOSJsonRpcMixin):
def test_PersonAccess_37_ComputeNodeSupply(self): def test_PersonAccess_37_ComputeNodeSupply(self):
software_url = 'live💩é /?%%20_test_url_%s' % self.generateNewId() software_url = 'live💩é /?%%20_test_url_%s' % self.generateNewId()
response = self.callJsonRpcWebService( response = self.callJsonRpcWebService(
"slapos.post.slapos_jio_api_create_software_installation", "slapos.post.software_installation",
{ {
"portal_type": "Software Installation", "portal_type": "Software Installation",
"compute_node_id": self.compute_node.getReference(), "compute_node_id": self.compute_node.getReference(),
......
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