Top Level Namespace
Defined Under Namespace
Modules: ConfigReader, Interval, MediaType, TrafficUnits, Vzcdn
Classes: Arg, Cell, ClOptions, Command, CommonRestUtils, ConfigCommand, ConfigDelete, ConfigGet, ConfigHandler, ConfigInit, ConfigSet, Diff, Flow, HttpSend, Methodical, MockHttpSend, MyCommand, ProxyCredentials, Reporting, Route, String, StructurePrint, TablePrint, Util, VzcdnApp, Zone, ZoneAdd, ZoneAudit, ZoneCreate, ZoneDelete, ZoneDiff, ZoneList, ZonePrint, ZonePull, ZonePush, ZoneSetHealthCheck, ZoneUpdate
Constant Summary
collapse
- ZONEDIR =
"zones"
- HOST =
Move this file to ~/.vdms.d/userInfo.rb
"ftp.cpm.BED3.edgecastcdn.net"
- USER =
"[email protected]"
- PWD =
"kevin123"
- API_TOKEN =
"e22db149-7369-4d7b-9c53-38d38746ccea"
- ACCT_NUM =
"BED3"
- URI_PREFIX =
"https://api.edgecast.com/v2/mcc/customers/" + ACCT_NUM + "/"
Instance Method Summary
collapse
-
#add_origin(media_type, directory, host_header, http_host_names, http_load_balancing, https_host_names, https_load_balancing, shield_pops) ⇒ Object
-
#delete_customer_origin(origin_id) ⇒ Object
-
#get_all_compression_settings ⇒ Object
-
#get_all_customer_origins ⇒ Object
-
#get_all_query_string_caching_settings ⇒ Object
-
#get_all_query_string_logging_settings ⇒ Object
-
#get_compression_setting(media_type) ⇒ Object
-
#get_current_bandwidth(media_type) ⇒ Object
-
#get_current_cache_status_statistics(media_type) ⇒ Object
-
#get_current_status_code_statistics(media_type) ⇒ Object
-
#get_current_streams ⇒ Object
-
#get_current_total_connections(media_type) ⇒ Object
-
#get_query_string_caching_setting(media_type) ⇒ Object
-
#get_query_string_logging_setting(media_type) ⇒ Object
-
#getAllEdgeNodes ⇒ Object
-
#getPurgeRequest(id) ⇒ Object
-
#loadContent(path, type) ⇒ Object
-
#purgeContent(path, type) ⇒ Object
-
#set_debug ⇒ Object
-
#set_output(file_name) ⇒ Object
-
#update_compression_settings(media_type, enable, *content_types) ⇒ Object
-
#update_query_string_caching_setting(query_string_caching, media_type) ⇒ Object
-
#update_query_string_logging_status(media_type, logging) ⇒ Object
Instance Method Details
#add_origin(media_type, directory, host_header, http_host_names, http_load_balancing, https_host_names, https_load_balancing, shield_pops) ⇒ Object
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/mediaManagment.rb', line 67
def add_origin(media_type, directory, , http_host_names, http_load_balancing, https_host_names, https_load_balancing, shield_pops)
body = { :DirectoryName => directory, :HostHeader => , :HttpHostnames => http_host_names, :HttpLoadBalancing => http_load_balancing,
:HttpsHostnames => https_host_names, :HttpsLoadBalancing => https_load_balancing, :ShieldPOPs => shield_pops }
media_type_s = case when MediaType::HTTP_LARGE then "httplarge"
when MediaType::HTTP_SMALL then "httpsmall"
when MediaType::FLASH_MEDIA then "flash"
when MediaType::ADN then "adn" end
callMethod("origins/" + media_type_s, :post, body)
end
|
#delete_customer_origin(origin_id) ⇒ Object
79
80
81
|
# File 'lib/mediaManagment.rb', line 79
def delete_customer_origin(origin_id)
callMethod("origins/" + origin_id.to_s, :delete)
end
|
#get_all_compression_settings ⇒ Object
23
24
25
|
# File 'lib/mediaManagment.rb', line 23
def get_all_compression_settings
callMethod("compression", :get)
end
|
#get_all_customer_origins ⇒ Object
63
64
65
|
# File 'lib/mediaManagment.rb', line 63
def get_all_customer_origins()
callMethod("origins/httplarge", :get)
end
|
#get_all_query_string_caching_settings ⇒ Object
27
28
29
|
# File 'lib/mediaManagment.rb', line 27
def get_all_query_string_caching_settings
callMethod("querystringcaching", :get)
end
|
#get_all_query_string_logging_settings ⇒ Object
31
32
33
|
# File 'lib/mediaManagment.rb', line 31
def get_all_query_string_logging_settings
callMethod("querystringlogging", :get)
end
|
#get_compression_setting(media_type) ⇒ Object
35
36
37
|
# File 'lib/mediaManagment.rb', line 35
def get_compression_setting (media_type)
callMethod("compression?mediatypeid=" + media_type.to_s, :get)
end
|
#get_current_bandwidth(media_type) ⇒ Object
5
6
7
|
# File 'lib/realTimeStats.rb', line 5
def get_current_bandwidth(media_type)
callMethod(media_type.to_s + "/bandwidth", :get)
end
|
#get_current_cache_status_statistics(media_type) ⇒ Object
9
10
11
|
# File 'lib/realTimeStats.rb', line 9
def get_current_cache_status_statistics(media_type)
callMethod(media_type.to_s + "/cachestatus", :get)
end
|
#get_current_status_code_statistics(media_type) ⇒ Object
13
14
15
|
# File 'lib/realTimeStats.rb', line 13
def get_current_status_code_statistics(media_type)
callMethod(media_type.to_s + "/statuscode", :get)
end
|
#get_current_streams ⇒ Object
17
18
19
|
# File 'lib/realTimeStats.rb', line 17
def get_current_streams
callMethod("2/streams", :get)
end
|
#get_current_total_connections(media_type) ⇒ Object
21
22
23
|
# File 'lib/realTimeStats.rb', line 21
def get_current_total_connections(media_type)
callMethod(media_type.to_s + "/connections", :get)
end
|
#get_query_string_caching_setting(media_type) ⇒ Object
39
40
41
|
# File 'lib/mediaManagment.rb', line 39
def get_query_string_caching_setting(media_type)
callMethod("querystringcaching?mediatypeid=" + media_type.to_s, :get)
end
|
#get_query_string_logging_setting(media_type) ⇒ Object
43
44
45
|
# File 'lib/mediaManagment.rb', line 43
def get_query_string_logging_setting(media_type)
callMethod("querystringlogging?mediatypeid=" + media_type.to_s, :get)
end
|
#getAllEdgeNodes ⇒ Object
9
10
11
|
# File 'lib/mediaManagment.rb', line 9
def getAllEdgeNodes()
callMethod("edgenodes", :get)
end
|
#getPurgeRequest(id) ⇒ Object
5
6
7
|
# File 'lib/mediaManagment.rb', line 5
def getPurgeRequest(id)
callMethod("edge/purge/" + id, :get)
end
|
#loadContent(path, type) ⇒ Object
13
14
15
16
|
# File 'lib/mediaManagment.rb', line 13
def loadContent(path, type)
body = {:MediaPath => path, :MediaType => type}
callMethod("edge/load", :put, body)
end
|
#purgeContent(path, type) ⇒ Object
18
19
20
21
|
# File 'lib/mediaManagment.rb', line 18
def purgeContent(path, type)
body = {:MediaPath => path, :MediaType => type}
callMethod("edge/purge", :put, body)
end
|
#set_debug ⇒ Object
7
8
9
|
# File 'lib/test_options.rb', line 7
def set_debug
$debug = true
end
|
#set_output(file_name) ⇒ Object
10
11
12
|
# File 'lib/test_options.rb', line 10
def set_output(file_name)
puts "file name = " + file_name
end
|
#update_compression_settings(media_type, enable, *content_types) ⇒ Object
47
48
49
50
|
# File 'lib/mediaManagment.rb', line 47
def update_compression_settings(media_type, enable, *content_types)
body = { :ContentTypes => content_types, :MediaTypeId => media_type, :Status => (enable ? 1 :0) }
callMethod("compression", :put, body)
end
|
#update_query_string_caching_setting(query_string_caching, media_type) ⇒ Object
52
53
54
55
|
# File 'lib/mediaManagment.rb', line 52
def update_query_string_caching_setting (query_string_caching, media_type)
body = { :QueryStringCaching => query_string_caching, :MediaTypeId => media_type}
callMethod("querystringcaching", :put, body)
end
|
#update_query_string_logging_status(media_type, logging) ⇒ Object
57
58
59
60
|
# File 'lib/mediaManagment.rb', line 57
def update_query_string_logging_status(media_type, logging)
body = { :QueryStringLogging => logging, :MediaTypeId => media_type}
callMethod("querystringlogging", :put, body)
end
|