Sha256: 9008972deb8597ff6add388e33005048488af9ed03bbf59c2d975513c6011e9a

Contents?: true

Size: 1.29 KB

Versions: 4

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

module Lunanode
  module APIActions
    module DNS
      def dns_list
        action(:dns, :list)
      end

      def dns_set(ip:, hostname:)
        action(:dns, :set, ip: ip, hostname: hostname)
      end

      def dns_zone_list
        action(:dns, :"zone-list")
      end

      def dns_zone_add(origin:, ttl: nil)
        action(:dns, :"zone-add", origin: origin, ttl: ttl)
      end

      def dns_zone_remove(zone_id:)
        action(:dns, :"zone-remove", zone_id: zone_id)
      end

      def dns_record_list(zone_id:)
        action(:dns, :"record-list", zone_id: zone_id)
      end

      def dns_record_add(zone_id:, name:, data:, ttl:, type:)
        action(:dns, :"record-add", zone_id: zone_id, name: name, data: data, ttl: ttl, type: type)
      end

      def dns_record_remove(record_id:)
        action(:dns, :"record-remove", record_id: record_id)
      end

      def dns_dyn_list
        action(:dns, :"dyn-list")
      end

      def dns_dyn_add(name:, ip:)
        action(:dns, :"dyn-add", name: name, ip: ip)
      end

      def dns_dyn_update(dyn_id:, name:, ip:)
        action(:dns, :"dyn-update", dyn_id: dyn_id, name: name, ip: ip)
      end

      def dns_dyn_remove(dyn_id:)
        action(:dns, :"dyn-remove", dyn_id: dyn_id)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lunanode-0.3.1 lib/lunanode/api_actions/default/dns.rb
lunanode-0.3.0 lib/lunanode/api_actions/default/dns.rb
lunanode-0.2.0 lib/lunanode/api_actions/default/dns.rb
lunanode-0.1.6 lib/lunanode/api_actions/default/dns.rb