Ejemplo n.º 1
0
 def test_set_boot_source_sets_device(self):
     ip, port, username, password, node_id, context = self.make_context()
     api = RECSAPI(ip, port, username, password)
     boot_source = '2'
     boot_persistent = 'false'
     params = {'source': boot_source, 'persistent': boot_persistent}
     mock_put = self.patch(api, "put")
     api.set_boot_source(node_id, boot_source, boot_persistent)
     self.assertThat(
         mock_put,
         MockCalledOnceWith('node/%s/manage/set_bootsource' % node_id,
                            params=params))
Ejemplo n.º 2
0
 def test_set_boot_source_sets_device(self):
     ip, port, username, password, node_id, context = self.make_context()
     api = RECSAPI(ip, port, username, password)
     boot_source = "2"
     boot_persistent = "false"
     params = {"source": boot_source, "persistent": boot_persistent}
     mock_put = self.patch(api, "put")
     api.set_boot_source(node_id, boot_source, boot_persistent)
     self.assertThat(
         mock_put,
         MockCalledOnceWith("node/%s/manage/set_bootsource" % node_id,
                            params=params),
     )