Rackspace 云服务器 API 是否具有“个性”?实地工作?
我使用 Ruby 绑定到 CloudServers API 来启动机器集群。
API 包括使用称为“个性”的字段将文件“注入”到新创建的计算机的文件系统中的功能。但是,我无法通过“个性”键上传文件。计算机已正确创建,但创建服务器时该文件不存在。
这是一个演示这一点的测试脚本:
#!/usr/bin/env ruby
require 'rubygems'
require 'cloudservers'
cs = CloudServers::Connection.new(:username=>"user",:api_key=>"key")
begin
server = cs.create_server(:flavorId=>1,
:name=>"personality-test",
:imageId=>7888402,
:personality=>{"/tmp/foo"=>"/tmp/foo" })
rescue
print "Failed to create server ", $!, "\n"
end
有人能够做到这一点吗?
I'm using the Ruby binding to the CloudServers API to spin up a cluster of machines.
The API includes the ability to "inject" files into the filesystem of the newly created machine, using a field called "personality". However, I'm not able to upload files via the "personality" key. The machine is created properly, but the file is not present when the server is created.
Here's a test script that demonstrates this:
#!/usr/bin/env ruby
require 'rubygems'
require 'cloudservers'
cs = CloudServers::Connection.new(:username=>"user",:api_key=>"key")
begin
server = cs.create_server(:flavorId=>1,
:name=>"personality-test",
:imageId=>7888402,
:personality=>{"/tmp/foo"=>"/tmp/foo" })
rescue
print "Failed to create server ", $!, "\n"
end
Has anyone been able to make this work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您正在使用哪个库,但我已经通过 Fog 的 Rackspace Cloud 后端成功使用了个性。
I'm not sure which library you're using, but I've successfully used personalities via Fog's Rackspace Cloud backend.