11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/vagrant-dns-updater/command.rb', line 11
def execute
access = {
"accessRules" => [
{ "method" => "GET", "path" => "/domain/*" },
{ "method" => "POST", "path" => "/domain/*" },
{ "method" => "PUT", "path" => "/domain/*" },
{ "method" => "DELETE", "path" => "/domain/*" },
]
}
argv = parse_args
result = OVH::REST.generate_consumer_key(argv, access)
raise Vagrant::Errors::VagrantError.new, result['message'] if result['message'] == 'Invalid application key'
puts <<-EOF
validationUrl: #{result['validationUrl']}
consumerkey: #{result['consumerKey']}
EOF
end
|