Пример #1
0
    def test_build_namenode_restart_request(self):
        res = decomission_helper.build_namenode_restart_request("c1", self.i1)

        self.assertEqual("i1", res["Requests/resource_filters"][0]["hosts"])
        self.assertEqual("c1",
                         res["RequestInfo"]["operation_level"]["cluster_name"])
Пример #2
0
 def restart_namenode(self, cluster_name, instance):
     url = self._base_url + "/clusters/%s/requests" % cluster_name
     data = d_helper.build_namenode_restart_request(cluster_name, instance)
     resp = self.post(url, data=jsonutils.dumps(data))
     self.wait_ambari_request(self.req_id(resp), cluster_name)
Пример #3
0
 def restart_namenode(self, cluster_name, instance):
     url = self._base_url + "/clusters/%s/requests" % cluster_name
     data = d_helper.build_namenode_restart_request(cluster_name, instance)
     resp = self.post(url, data=jsonutils.dumps(data))
     self.wait_ambari_request(self.req_id(resp), cluster_name)
Пример #4
0
    def test_build_namenode_restart_request(self):
        res = decomission_helper.build_namenode_restart_request("c1", self.i1)

        self.assertEqual("i1", res["Requests/resource_filters"][0]["hosts"])
        self.assertEqual("c1",
                         res["RequestInfo"]["operation_level"]["cluster_name"])