Project

General

Profile

« Previous | Next » 

Revision e82a264b

Added by Marc Dequènes over 14 years ago

  • ID e82a264b9c5f51c4eb0d1cfffb37d5628c41bc88

[evol] added session management to the cyborg server (refs #31)

View differences:

bin/mapmaker
class Zones
include CyborgServerInterface
include CyborgServerStatefulInterface
def initialize
@dns = Services::DNS::System.new
......
end
def method_missing(method_name, *args)
if api_methods.include?(method_name.to_s)
Zone.new(method_name.to_s)
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
class Zone < Services::DNS::Zone
include CyborgServerEmbededInterface
include CyborgServerEmbeddedInterface
end
end
end

Also available in: Unified diff