forked from ryanoleary/rs-selfservice-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
show_cloud_hrefs.rb
29 lines (20 loc) · 908 Bytes
/
show_cloud_hrefs.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require "rubygems"
require "right_api_client"
require File.expand_path('../lib/print_cloud_hrefs', __FILE__)
require "optparse"
require "yaml"
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: export_deployment [options]"
opts.on("-e", "--email EMAIL_ADDRESS", "Email Address") { |v| options[:email] = v }
opts.on("-p", "--password PASSWORD", "Password") { |v| options[:password] = v }
opts.on("-a", "--account ID", "Account ID") { |v| options[:account_id] = v }
opts.on("-i", "--include_images", "Include image hrefs (can be many)" ) { |v| options[:images] = v }
opts.on( "-h", "--help", "Display this screen" ) do
puts opts
exit
end
end.parse!
# Login to RightScale
@client = RightApi::Client.new(:email=>options[:email],:password=>options[:password],:account_id=>options[:account_id])
print_cloud_details @client, options[:images]