예제 #1
0
 def test_create_and_get_lqueue(self):
     queue_id = queuelib.create_lqueue(self.fake_cluster, self.fake_queue)
     queue_res = nsxlib.do_request(
         "GET", nsxlib._build_uri_path("lqueue", resource_id=queue_id), cluster=self.fake_cluster
     )
     self.assertEqual(queue_id, queue_res["uuid"])
     self.assertEqual("fake_queue", queue_res["display_name"])
예제 #2
0
 def test_delete_lqueue(self):
     queue_id = queuelib.create_lqueue(self.fake_cluster, self.fake_queue)
     queuelib.delete_lqueue(self.fake_cluster, queue_id)
     self.assertRaises(
         exceptions.NotFound,
         nsxlib.do_request,
         "GET",
         nsxlib._build_uri_path("lqueue", resource_id=queue_id),
         cluster=self.fake_cluster,
     )