【发布时间】:2014-06-22 03:32:00
【问题描述】:
我正在尝试使用 kitchen-openstack 使其成为工具测试厨房,以对我们拥有的一些 Chef 食谱执行一些集成/功能测试。
但我无法让它工作:( 我有一个包含以下内容的 .kitchen.yml:
driver:
name: openstack
openstack_username: test
openstack_api_key: test
openstack_auth_url: http://<openstackServerIp>:35357/v2.0/
require_chef_omnibus: latest
image_ref: CentOS-6.5-Template
flavor_ref: cloud.tiny
openstack_tenant: test
provisioner:
name: chef_solo
platforms:
- name: centos-6.5
suites:
- name: default
run_list:
- recipe[myTestChef::default]
到目前为止,当我执行 kitchen create default-centos-65 时,我收到的是:
Message: Expected([200, 204]) <=> Actual(400 Bad Request)
response => #<Excon::Response:0x00000001eed698 @data={:body=>"{\"error\": {\"message\": \"get_version_v2() got an unexpected keyword argument 'auth'\", \"code\": 400, \"title\": \"Bad Request\"}}", :headers=>{"Vary"=>"X-Auth-Token", "Content-Type"=>"application/json", "Content-Length"=>"121", "Date"=>"Mon, 05 May 2014 18:02:15 GMT"}, :status=>400, :remote_ip=>"<openstackServerIp>", :local_port=>34592, :local_address=>"192.168.10.32"}, @body="{\"error\": {\"message\": \"get_version_v2() got an unexpected keyword argument 'auth'\", \"code\": 400, \"title\": \"Bad Request\"}}", @headers={"Vary"=>"X-Auth-Token", "Content-Type"=>"application/json", "Content-Length"=>"121", "Date"=>"Mon, 05 May 2014 18:02:15 GMT"}, @status=400, @remote_ip="<openstackServerIp>", @local_port=34592, @local_address="192.168.10.32">
当我运行厨房清单时,我得到:
Instance Driver Provisioner Last Action
default-centos-65 Openstack ChefSolo <Not Created>
我做错了什么?谁能分享一些如何设置的步骤或示例?
我从在 OpenStack 的同一项目中创建的 VM 运行它。
【问题讨论】:
-
请在以后格式化您的代码
-
对不起,我不太清楚如何使用这个格式,我在这里是全新的发帖问题。
标签: chef-infra openstack test-kitchen