dyn-rb 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +202 -0
- data/lib/dyn-rb.rb +19 -0
- data/lib/dyn/exceptions.rb +36 -0
- data/lib/dyn/http/curb.rb +79 -0
- data/lib/dyn/http/http_client.rb +90 -0
- data/lib/dyn/http/net_http.rb +50 -0
- data/lib/dyn/http/patron.rb +52 -0
- data/lib/dyn/messaging.rb +156 -0
- data/lib/dyn/messaging/accounts.rb +53 -0
- data/lib/dyn/messaging/bounces.rb +41 -0
- data/lib/dyn/messaging/clicks.rb +49 -0
- data/lib/dyn/messaging/complaints.rb +41 -0
- data/lib/dyn/messaging/delivery.rb +41 -0
- data/lib/dyn/messaging/issues.rb +41 -0
- data/lib/dyn/messaging/opens.rb +49 -0
- data/lib/dyn/messaging/recipients.rb +41 -0
- data/lib/dyn/messaging/send_mail.rb +37 -0
- data/lib/dyn/messaging/senders.rb +61 -0
- data/lib/dyn/messaging/sent_mail.rb +41 -0
- data/lib/dyn/messaging/suppressions.rb +49 -0
- data/lib/dyn/traffic.rb +238 -0
- data/lib/dyn/traffic/base.rb +57 -0
- data/lib/dyn/traffic/gslb.rb +169 -0
- data/lib/dyn/traffic/http_redirect.rb +83 -0
- data/lib/dyn/traffic/qps_report.rb +30 -0
- data/lib/dyn/traffic/resource.rb +150 -0
- data/lib/dyn/traffic/secondary_zone.rb +87 -0
- data/lib/dyn/traffic/session.rb +37 -0
- data/lib/dyn/traffic/zone.rb +51 -0
- data/lib/dyn/version.rb +3 -0
- metadata +76 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
module Dyn
|
2
|
+
module Traffic
|
3
|
+
class SecondaryZone
|
4
|
+
attr_accessor :contact_nickname, :masters, :tsig, :activate, :deactivate, :retransfer
|
5
|
+
|
6
|
+
def initialize(dyn, zone, fqdn, contact_nickname, tsig_key_name, activate, deactivate, retransfer)
|
7
|
+
@dyn = dyn
|
8
|
+
@zone = zone
|
9
|
+
@fqdn = fqdn
|
10
|
+
@contact_nickname = contact_nickname
|
11
|
+
@tsig_key_name = tsig_key_name
|
12
|
+
@activate = activate
|
13
|
+
@deactivate = deactivate
|
14
|
+
@retransfer = retransfer
|
15
|
+
end
|
16
|
+
|
17
|
+
def zone(value=nil)
|
18
|
+
value ? (@zone = value; self) : @zone
|
19
|
+
end
|
20
|
+
|
21
|
+
def fqdn(value=nil)
|
22
|
+
value ? (@fqdn = value; self) : @fqdn
|
23
|
+
end
|
24
|
+
|
25
|
+
def contact_nickname()
|
26
|
+
value ? (@contact_nickname = value; self) : @contact_nickname
|
27
|
+
end
|
28
|
+
|
29
|
+
def tsig_key_name()
|
30
|
+
value ? (@tsig_key_name = value; self) : @tsig_key_name
|
31
|
+
end
|
32
|
+
|
33
|
+
def activate()
|
34
|
+
value ? (@activate = value; self) : @activate
|
35
|
+
end
|
36
|
+
|
37
|
+
def deactivate()
|
38
|
+
value ? (@deactivate = value; self) : @deactivate
|
39
|
+
end
|
40
|
+
|
41
|
+
def retransfer()
|
42
|
+
value ? (@retransfer = value; self) : @retransfer
|
43
|
+
end
|
44
|
+
|
45
|
+
def resource_path
|
46
|
+
"Secondary"
|
47
|
+
end
|
48
|
+
|
49
|
+
def create(contact_nickname, masters, tsig)
|
50
|
+
@dyn.create("#{resource_path}")
|
51
|
+
end
|
52
|
+
|
53
|
+
def get()
|
54
|
+
@dyn.get("#{resource_path}")
|
55
|
+
end
|
56
|
+
|
57
|
+
def update(contact_nickname, masters, tsig)
|
58
|
+
@dyn.update("#{resource_path}")
|
59
|
+
end
|
60
|
+
|
61
|
+
def activate(activate=true)
|
62
|
+
@dyn.update("#{resource_path}")
|
63
|
+
end
|
64
|
+
|
65
|
+
def deactivate(deactivate=true)
|
66
|
+
@dyn.update("#{resource_path}")
|
67
|
+
end
|
68
|
+
|
69
|
+
def retransfer(retransfer=true)
|
70
|
+
@dyn.update("#{resource_path}")
|
71
|
+
end
|
72
|
+
|
73
|
+
def to_json
|
74
|
+
{
|
75
|
+
"zone" => @zone,
|
76
|
+
"fqdn" => @fqdn,
|
77
|
+
"contact_nickname" => @contact_nickname,
|
78
|
+
"masters" => @masters,
|
79
|
+
"tsig" => @tsig,
|
80
|
+
"activate" => @activate,
|
81
|
+
"deactivate" => @deactivate,
|
82
|
+
"retransfer" => @retransfer
|
83
|
+
}.to_json
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sunny Gleason (<sunny@thesunnycloud.com>)
|
3
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
4
|
+
# Copyright:: Copyright (c) 2013 Dyn, Inc.
|
5
|
+
# Copyright:: Copyright (c) 2010 Opscode, Inc.
|
6
|
+
# License:: Apache License, Version 2.0
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
module Dyn
|
22
|
+
module Traffic
|
23
|
+
class Session < Base
|
24
|
+
def initialize(dyn)
|
25
|
+
@dyn = dyn
|
26
|
+
end
|
27
|
+
|
28
|
+
def create
|
29
|
+
@dyn.post('Session', { 'customer_name' => @dyn.customer_name, 'user_name' => @dyn.user_name, 'password' => @dyn.password }, {})
|
30
|
+
end
|
31
|
+
|
32
|
+
def delete
|
33
|
+
@dyn.delete('Session')
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Sunny Gleason (<sunny@thesunnycloud.com>)
|
3
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
4
|
+
# Copyright:: Copyright (c) 2013 Dyn, Inc.
|
5
|
+
# Copyright:: Copyright (c) 2010 Opscode, Inc.
|
6
|
+
# License:: Apache License, Version 2.0
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
module Dyn
|
22
|
+
module Traffic
|
23
|
+
class Zone < Base
|
24
|
+
def initialize(dyn, zone)
|
25
|
+
@dyn = dyn
|
26
|
+
@zone = zone
|
27
|
+
end
|
28
|
+
|
29
|
+
def create(options)
|
30
|
+
@dyn.post("Zone/#{@zone}", {
|
31
|
+
:zone => @zone,
|
32
|
+
:rname => options[:rname],
|
33
|
+
:serial_style => options[:serial_style],
|
34
|
+
:ttl => options[:ttl]
|
35
|
+
})
|
36
|
+
end
|
37
|
+
|
38
|
+
def delete
|
39
|
+
@dyn.delete("Zone/#{@zone}")
|
40
|
+
end
|
41
|
+
|
42
|
+
def get
|
43
|
+
@dyn.get("Zone/#{@zone}")
|
44
|
+
end
|
45
|
+
|
46
|
+
def get_all
|
47
|
+
@dyn.get("Zone/")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/lib/dyn/version.rb
ADDED
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dyn-rb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sunny Gleason
|
8
|
+
- Dani Dewitt
|
9
|
+
- Adam Sarenski
|
10
|
+
- Adam Jacob
|
11
|
+
- Ranjib Dey
|
12
|
+
autorequire:
|
13
|
+
bindir: bin
|
14
|
+
cert_chain: []
|
15
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
16
|
+
dependencies: []
|
17
|
+
description: Dyn Ruby SDK
|
18
|
+
email: concierge@dyn.com
|
19
|
+
executables: []
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- LICENSE
|
24
|
+
- lib/dyn/exceptions.rb
|
25
|
+
- lib/dyn/http/curb.rb
|
26
|
+
- lib/dyn/http/http_client.rb
|
27
|
+
- lib/dyn/http/net_http.rb
|
28
|
+
- lib/dyn/http/patron.rb
|
29
|
+
- lib/dyn/messaging/accounts.rb
|
30
|
+
- lib/dyn/messaging/bounces.rb
|
31
|
+
- lib/dyn/messaging/clicks.rb
|
32
|
+
- lib/dyn/messaging/complaints.rb
|
33
|
+
- lib/dyn/messaging/delivery.rb
|
34
|
+
- lib/dyn/messaging/issues.rb
|
35
|
+
- lib/dyn/messaging/opens.rb
|
36
|
+
- lib/dyn/messaging/recipients.rb
|
37
|
+
- lib/dyn/messaging/send_mail.rb
|
38
|
+
- lib/dyn/messaging/senders.rb
|
39
|
+
- lib/dyn/messaging/sent_mail.rb
|
40
|
+
- lib/dyn/messaging/suppressions.rb
|
41
|
+
- lib/dyn/messaging.rb
|
42
|
+
- lib/dyn/traffic/base.rb
|
43
|
+
- lib/dyn/traffic/gslb.rb
|
44
|
+
- lib/dyn/traffic/http_redirect.rb
|
45
|
+
- lib/dyn/traffic/qps_report.rb
|
46
|
+
- lib/dyn/traffic/resource.rb
|
47
|
+
- lib/dyn/traffic/secondary_zone.rb
|
48
|
+
- lib/dyn/traffic/session.rb
|
49
|
+
- lib/dyn/traffic/zone.rb
|
50
|
+
- lib/dyn/traffic.rb
|
51
|
+
- lib/dyn/version.rb
|
52
|
+
- lib/dyn-rb.rb
|
53
|
+
homepage: http://github.com/dyninc/dyn-rb
|
54
|
+
licenses: []
|
55
|
+
metadata: {}
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubyforge_project:
|
72
|
+
rubygems_version: 2.0.14
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Dyn Ruby SDK
|
76
|
+
test_files: []
|