Add LB id to the worker archive API for Swift.

Swift archiving requires the load balancer ID to create the container
name.

Change-Id: I2d4a57f2aa50b7a2f65c52de727e1469d35b0987
This commit is contained in:
David Shrewsbury 2013-03-22 13:34:03 -04:00
parent d4397cc2f9
commit f781ee9350
2 changed files with 5 additions and 4 deletions

View File

@ -313,6 +313,7 @@ class LBaaSController(object):
lb_list = self.msg[self.LBLIST_FIELD]
params['protocol'] = lb_list[0]['protocol']
params['lbid'] = lb_list[0]['id']
params['basepath'] = self.msg[self.OBJ_STORE_BASEPATH_FIELD]
params['endpoint'] = self.msg[self.OBJ_STORE_ENDPOINT_FIELD]
params['token'] = self.msg[self.OBJ_STORE_TOKEN_FIELD]

View File

@ -171,7 +171,7 @@ class TestWorkerController(testtools.TestCase):
c.OBJ_STORE_TYPE_FIELD: 'Swift',
c.OBJ_STORE_ENDPOINT_FIELD: "https://example.com",
c.OBJ_STORE_TOKEN_FIELD: "XXXX",
c.LBLIST_FIELD: [{'protocol': 'http'}]
c.LBLIST_FIELD: [{'protocol': 'http', 'id': '123'}]
}
controller = c(self.logger, null_driver, msg)
response = controller.run()
@ -183,7 +183,7 @@ class TestWorkerController(testtools.TestCase):
c.OBJ_STORE_TYPE_FIELD: 'Swift',
c.OBJ_STORE_BASEPATH_FIELD: "/lbaaslogs",
c.OBJ_STORE_TOKEN_FIELD: "XXXX",
c.LBLIST_FIELD: [{'protocol': 'http'}]
c.LBLIST_FIELD: [{'protocol': 'http', 'id': '123'}]
}
controller = c(self.logger, null_driver, msg)
response = controller.run()
@ -195,7 +195,7 @@ class TestWorkerController(testtools.TestCase):
c.OBJ_STORE_TYPE_FIELD: 'Swift',
c.OBJ_STORE_BASEPATH_FIELD: "/lbaaslogs",
c.OBJ_STORE_ENDPOINT_FIELD: "https://example.com",
c.LBLIST_FIELD: [{'protocol': 'http'}]
c.LBLIST_FIELD: [{'protocol': 'http', 'id': '123'}]
}
controller = c(self.logger, null_driver, msg)
response = controller.run()
@ -220,7 +220,7 @@ class TestWorkerController(testtools.TestCase):
c.OBJ_STORE_BASEPATH_FIELD: "/lbaaslogs",
c.OBJ_STORE_ENDPOINT_FIELD: "https://example.com",
c.OBJ_STORE_TOKEN_FIELD: "XXXX",
c.LBLIST_FIELD: [{'protocol': 'http'}]
c.LBLIST_FIELD: [{'protocol': 'http', 'id': '123'}]
}
null_driver = LoadBalancerDriver()
controller = c(self.logger, null_driver, msg)