Revision b7f7d214
Added by Marc Dequènes over 14 years ago
- ID b7f7d214220c8cb982ed8e5dfdb68bd7a199e1d0
bin/mapmaker | ||
---|---|---|
|
||
class MapMakerInterface
|
||
include CyborgServerInterface
|
||
include CyborgServerDefaultInterface
|
||
include CyborgServerRootInterfaceAddon
|
||
|
||
class DNS < Services::DNS::System
|
||
include CyborgServerInterface
|
||
... | ... | |
"coucou: " + data.inspect
|
||
end
|
||
|
||
class Zones
|
||
class Taiste
|
||
include CyborgServerInterface
|
||
|
||
def api_methods
|
||
["coucou", "toto", "plop"]
|
||
end
|
||
|
||
dynamic_interface {|node_name| ">>> #{node_name} <<<" }
|
||
end
|
||
|
||
class Zones
|
||
include CyborgServerStatefulInterface
|
||
|
||
def initialize
|
||
... | ... | |
@dns.zones
|
||
end
|
||
|
||
def method_missing(method_name, *args)
|
||
session = args.shift
|
||
|
||
zone_name = method_name.to_s
|
||
if api_methods.include?(zone_name)
|
||
resource_key = "dns/zones/#{zone_name}"
|
||
session.store.get(resource_key) { Zone.new(zone_name) }
|
||
else
|
||
super
|
||
end
|
||
end
|
||
stateful_dynamic_interface("dns/zones/#NODE#") {|node_name| Zone.new(node_name) }
|
||
|
||
class Zone < Services::DNS::Zone
|
||
include CyborgServerEmbeddedInterface
|
Also available in: Unified diff
[evol] MapMaker / Cyborg server interface: cleanup, reorg, ...