コード例 #1
0
 def setUp(self):
     super(HostAPITestCase, self).setUp()
     self.host_api = ha_api.HostAPI()
     self.req = fakes.HTTPRequest.blank('/v1/segments/%s/hosts' %
                                        uuidsentinel.fake_segment,
                                        use_admin_context=True)
     self.context = self.req.environ['masakari.context']
     self.failover_segment = fakes_data.create_fake_failover_segment(
         name="segment1",
         id=1,
         description="something",
         service_type="COMPUTE",
         recovery_method="auto",
         uuid=uuidsentinel.fake_segment)
     self.host = fakes_data.create_fake_host(
         name="host_1",
         id=1,
         reserved=False,
         on_maintenance=False,
         type="fake",
         control_attributes="fake-control_attributes",
         uuid=uuidsentinel.fake_host_1,
         failover_segment_id=uuidsentinel.fake_segment1)
コード例 #2
0
 def __init__(self):
     self.api = host_api.HostAPI()