예제 #1
0
def ListResources(args=None):
    # Used in ListResources for external monitoring (e.g. FELIX monitoring)
    from openflow.optin_manager.geni.v3.configurators.optin import HandlerConfigurator
    rspec_manager = HandlerConfigurator.get_optin_rspec_manager()
    driver = HandlerConfigurator.get_optin_driver()
    resources_data = driver.get_all_devices()
    return rspec_manager.compose_advertisement(resources_data)
예제 #2
0
파일: ch_api.py 프로젝트: HalasNet/felix
def ListResources(args=None):
    # Used in ListResources for external monitoring (e.g. FELIX monitoring)
    from openflow.optin_manager.geni.v3.configurators.optin import HandlerConfigurator
    rspec_manager = HandlerConfigurator.get_optin_rspec_manager()
    driver = HandlerConfigurator.get_optin_driver()
    resources_data = driver.get_all_devices()
    return rspec_manager.compose_advertisement(resources_data)
예제 #3
0
파일: gapi3.py 프로젝트: HalasNet/felix
#URL_NAME
GAPI3_URL = "gapi3"

# Parameter Types
CREDENTIALS_TYPE = 'array' # of strings
OPTIONS_TYPE = 'struct'
RSPEC_TYPE = 'string'
VERSION_TYPE = 'struct'
URN_TYPE = 'string'
SUCCESS_TYPE = 'boolean'
STATUS_TYPE = 'struct'
TIME_TYPE = 'string'
URNS_TYPE = 'string'
ACTION_TYPE = 'string'

handler  = HandlerConfigurator.configure_handler()

@rpcmethod(signature=['string', 'string'], url_name=GAPI3_URL)
def ping(challenge):
    return challenge

@rpcmethod(signature=[VERSION_TYPE], url_name=GAPI3_URL)
def GetVersion(options={}):
    return handler.GetVersion(options)

@rpcmethod(signature=[RSPEC_TYPE, CREDENTIALS_TYPE, OPTIONS_TYPE], url_name=GAPI3_URL)
def ListResources(credentials, options):
    return handler.ListResources(credentials, options)

@rpcmethod(signature=[RSPEC_TYPE, URNS_TYPE, CREDENTIALS_TYPE, OPTIONS_TYPE], url_name=GAPI3_URL)
def Describe(urns, credentials, options):
예제 #4
0
#URL_NAME
GAPI3_URL = "gapi3"

# Parameter Types
CREDENTIALS_TYPE = 'array'  # of strings
OPTIONS_TYPE = 'struct'
RSPEC_TYPE = 'string'
VERSION_TYPE = 'struct'
URN_TYPE = 'string'
SUCCESS_TYPE = 'boolean'
STATUS_TYPE = 'struct'
TIME_TYPE = 'string'
URNS_TYPE = 'string'
ACTION_TYPE = 'string'

handler = HandlerConfigurator.configure_handler()


@rpcmethod(signature=['string', 'string'], url_name=GAPI3_URL)
def ping(challenge):
    return challenge


@rpcmethod(signature=[VERSION_TYPE], url_name=GAPI3_URL)
def GetVersion(options={}):
    return handler.GetVersion(options)


@rpcmethod(signature=[RSPEC_TYPE, CREDENTIALS_TYPE, OPTIONS_TYPE],
           url_name=GAPI3_URL)
def ListResources(credentials, options):