Class: Cumulus::CloudFront::Commands
Class Method Summary
collapse
format_message, help_message, manager_name, parse, usage_message, verify
Class Method Details
.banner_message ⇒ Object
6
7
8
9
10
11
|
# File 'lib/cloudfront/Commands.rb', line 6
def self.banner_message
format_message [
"cloudfront: Manage CloudFront",
"\tDiff and sync CloudFront configuration with AWS.",
]
end
|
.command_details ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/cloudfront/Commands.rb', line 13
def self.command_details
format_message [
["diff", "print out differences between local configuration and AWS (supplying the id of the distribution will diff only that distribution)"],
["invalidate", "create an invalidation. Must supply the name of the invalidation to run. Specifying 'list' as an argument lists the local invalidation configurations"],
["list", "list the locally defined distributions"],
["migrate", "produce Cumulus CloudFront distribution configuration from current AWS configuration"],
["sync", "sync local cloudfront distribution configuration with AWS (supplying the id of the distribution will sync only that distribution)"],
]
end
|
.execute(arguments) ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/cloudfront/Commands.rb', line 32
def self.execute(arguments)
if arguments[0] == "invalidate"
if arguments.size != 2
puts "Specify one invalidation to run"
exit
else
if arguments[1] == "list"
manager.list_invalidations
else
manager.invalidate(arguments[1])
end
end
else
super(arguments)
end
end
|
.manager ⇒ Object
23
24
25
26
|
# File 'lib/cloudfront/Commands.rb', line 23
def self.manager
require "cloudfront/manager/Manager"
Cumulus::CloudFront::Manager.new
end
|
.valid_options ⇒ Object
28
29
30
|
# File 'lib/cloudfront/Commands.rb', line 28
def self.valid_options
[["diff", "invalidate", "list", "migrate", "sync"]]
end
|