예제 #1
0
 def test_query_instance_ready(self):
     '''
     IP address assigned, and VM is ready
     '''
     reply = (200, {'primaryIp': '1.1.1.1', 'state': 'running'})
     with patch.object(joyent, 'show_instance', return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
     self.assertEqual(result, '1.1.1.1')
예제 #2
0
 def test_query_instance_ready(self):
     """
     IP address assigned, and VM is ready
     """
     reply = (200, {"primaryIp": "1.1.1.1", "state": "running"})
     with patch.object(joyent, "show_instance", return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__["cloud.fire_event"].called_once())
     self.assertEqual(result, "1.1.1.1")
예제 #3
0
파일: joyent_test.py 프로젝트: bryson/salt
 def test_query_instance_ready(self):
     '''
     IP address assigned, and VM is ready
     '''
     reply = (200, {'primaryIp': '1.1.1.1', 'state': 'running'})
     with patch.object(joyent, 'show_instance', return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
     self.assertEqual(result, '1.1.1.1')
예제 #4
0
 def test_query_instance_init(self):
     '''
     Initial provisioning, no IP assigned
     '''
     # Not yet reachable
     reply = (200, {'state': 'provisioning'})
     with patch.object(joyent, 'show_instance', return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
     self.assertEqual(result, None)
예제 #5
0
 def test_query_instance_init(self):
     """
     Initial provisioning, no IP assigned
     """
     # Not yet reachable
     reply = (200, {"state": "provisioning"})
     with patch.object(joyent, "show_instance", return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__["cloud.fire_event"].called_once())
     self.assertEqual(result, None)
예제 #6
0
파일: joyent_test.py 프로젝트: bryson/salt
 def test_query_instance_init(self):
     '''
     Initial provisioning, no IP assigned
     '''
     # Not yet reachable
     reply = (200, {'state': 'provisioning'})
     with patch.object(joyent, 'show_instance', return_value=reply):
         result = joyent.query_instance(self.vm_)
     self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
     self.assertEqual(result, None)