Class: Bosh::Director::LocalDnsRepo
- Defined in:
- lib/bosh/director/dns/local_dns_repo.rb
Instance Method Summary collapse
- #create_or_update(instance_model, dns_record_names) ⇒ Object
- #delete(instance_model) ⇒ Object
- #find(instance_model) ⇒ Object
-
#initialize(logger) ⇒ LocalDnsRepo
constructor
A new instance of LocalDnsRepo.
Constructor Details
#initialize(logger) ⇒ LocalDnsRepo
Returns a new instance of LocalDnsRepo.
4 5 6 |
# File 'lib/bosh/director/dns/local_dns_repo.rb', line 4 def initialize(logger) @logger = logger end |
Instance Method Details
#create_or_update(instance_model, dns_record_names) ⇒ Object
12 13 14 |
# File 'lib/bosh/director/dns/local_dns_repo.rb', line 12 def create_or_update(instance_model, dns_record_names) instance_model.update(dns_record_names: dns_record_names) end |
#delete(instance_model) ⇒ Object
16 17 18 |
# File 'lib/bosh/director/dns/local_dns_repo.rb', line 16 def delete(instance_model) instance_model.update(dns_record_names: []) end |
#find(instance_model) ⇒ Object
8 9 10 |
# File 'lib/bosh/director/dns/local_dns_repo.rb', line 8 def find(instance_model) instance_model.dns_record_names.to_a end |