Module: OmfRc::ResourceProxyDSL

Included in:
ResourceFactory, OmfRc::ResourceProxy::AbstractResource, OmfRc::ResourceProxy::Application, OmfRc::ResourceProxy::Mock, OmfRc::ResourceProxy::Net, OmfRc::ResourceProxy::Node, OmfRc::ResourceProxy::Package, OmfRc::ResourceProxy::VirtualMachine, OmfRc::ResourceProxy::VirtualMachineFactory, OmfRc::ResourceProxy::Wlan, Util::CommonTools, Util::Hostapd, Util::Ip, Util::Iw, Util::Libvirt, Util::Mock, Util::Mod, Util::OpenflowTools, Util::PlatformTools, Util::Sysfs, Util::Vmbuilder, Util::Wpa
Defined in:
omf_rc/lib/omf_rc/resource_proxy_dsl.rb

Overview

DSL contains some helper methods to ease the process defining resource proxies

DSL methods are defined under ClassMethods

Defined Under Namespace

Modules: ClassMethods

Constant Summary

PROXY_DIR =

Default directory contains proxy definition files

"omf_rc/resource_proxy"
UTIL_DIR =

Default directory contains utility definition files

"omf_rc/util"
DEFAULT_PROP_ACCESS =

Default property access rights through FRCP

[:configure, :request]

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(base)

When this module included, methods defined under ClassMethods will be available in resource definition files



28
29
30
# File 'omf_rc/lib/omf_rc/resource_proxy_dsl.rb', line 28

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

- (Object) call_hook(hook_name, context, *params)

Calling a hook within a given resource context



22
23
24
# File 'omf_rc/lib/omf_rc/resource_proxy_dsl.rb', line 22

def call_hook(hook_name, context, *params)
  context.send(hook_name, *params) if context.respond_to? hook_name
end