Class: Dyn::Traffic::SecondaryZone
- Inherits:
-
Object
- Object
- Dyn::Traffic::SecondaryZone
- Defined in:
- lib/dyn/traffic/secondary_zone.rb
Instance Attribute Summary collapse
-
#activate(activate = true) ⇒ Object
Returns the value of attribute activate.
-
#contact_nickname ⇒ Object
Returns the value of attribute contact_nickname.
-
#deactivate(deactivate = true) ⇒ Object
Returns the value of attribute deactivate.
-
#masters ⇒ Object
Returns the value of attribute masters.
-
#retransfer(retransfer = true) ⇒ Object
Returns the value of attribute retransfer.
-
#tsig ⇒ Object
Returns the value of attribute tsig.
Instance Method Summary collapse
- #create(contact_nickname, masters, tsig) ⇒ Object
- #fqdn(value = nil) ⇒ Object
- #get ⇒ Object
-
#initialize(dyn, zone, fqdn, contact_nickname, tsig_key_name, activate, deactivate, retransfer) ⇒ SecondaryZone
constructor
A new instance of SecondaryZone.
- #resource_path ⇒ Object
- #to_json ⇒ Object
- #tsig_key_name ⇒ Object
- #update(contact_nickname, masters, tsig) ⇒ Object
- #zone(value = nil) ⇒ Object
Constructor Details
#initialize(dyn, zone, fqdn, contact_nickname, tsig_key_name, activate, deactivate, retransfer) ⇒ SecondaryZone
Returns a new instance of SecondaryZone.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 6 def initialize(dyn, zone, fqdn, contact_nickname, tsig_key_name, activate, deactivate, retransfer) @dyn = dyn @zone = zone @fqdn = fqdn @contact_nickname = contact_nickname @tsig_key_name = tsig_key_name @activate = activate @deactivate = deactivate @retransfer = retransfer end |
Instance Attribute Details
#activate(activate = true) ⇒ Object
Returns the value of attribute activate.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def activate @activate end |
#contact_nickname ⇒ Object
Returns the value of attribute contact_nickname.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def contact_nickname @contact_nickname end |
#deactivate(deactivate = true) ⇒ Object
Returns the value of attribute deactivate.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def deactivate @deactivate end |
#masters ⇒ Object
Returns the value of attribute masters.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def masters @masters end |
#retransfer(retransfer = true) ⇒ Object
Returns the value of attribute retransfer.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def retransfer @retransfer end |
#tsig ⇒ Object
Returns the value of attribute tsig.
4 5 6 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 4 def tsig @tsig end |
Instance Method Details
#create(contact_nickname, masters, tsig) ⇒ Object
49 50 51 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 49 def create(contact_nickname, masters, tsig) @dyn.create("#{resource_path}") end |
#fqdn(value = nil) ⇒ Object
21 22 23 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 21 def fqdn(value=nil) value ? (@fqdn = value; self) : @fqdn end |
#get ⇒ Object
53 54 55 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 53 def get() @dyn.get("#{resource_path}") end |
#resource_path ⇒ Object
45 46 47 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 45 def resource_path "Secondary" end |
#to_json ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 73 def to_json { "zone" => @zone, "fqdn" => @fqdn, "contact_nickname" => @contact_nickname, "masters" => @masters, "tsig" => @tsig, "activate" => @activate, "deactivate" => @deactivate, "retransfer" => @retransfer }.to_json end |
#tsig_key_name ⇒ Object
29 30 31 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 29 def tsig_key_name() value ? (@tsig_key_name = value; self) : @tsig_key_name end |
#update(contact_nickname, masters, tsig) ⇒ Object
57 58 59 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 57 def update(contact_nickname, masters, tsig) @dyn.update("#{resource_path}") end |
#zone(value = nil) ⇒ Object
17 18 19 |
# File 'lib/dyn/traffic/secondary_zone.rb', line 17 def zone(value=nil) value ? (@zone = value; self) : @zone end |