[endpoint]
provider.type=AuthenticationFilter,AuthorizationFilter,LocalProvider
provider.name=vclcm
local.interfaces=\
        com.vmware.vapi.metadata.metamodel_impl,\
        com.vmware.vapi.metadata.cli.command_impl,\
        com.vmware.vapi.metadata.cli.namespace_impl,\
        com.vmware.vapi.metadata.cli.source_impl,\
        com.vmware.vapi.task.tasks_impl,\
        com.vmware.vapi.metadata.authentication_impl,\
        cli_api.provider.install_impl,\
        cli_api.provider.upgrade_impl,\
        cli_api.provider.migrate_impl,\
        cli_api.provider.validation_impl,\
        cli_api.provider.recommendation_impl,\
        cli_api.provider.log_impl,

protocol=tutorial
protocol.tutorial.msg=json
protocol.tutorial.rpc=wsgi
protocol.tutorial.rpc.server=wsgi
# To use the twisted server, comment out the two lines above and
# uncomment out the two lines below. But since vclcm is using wsgi
# leave these as-is.
#protocol.tutorial.rpc=http://localhost:8080/api
#protocol.tutorial.rpc.server=twisted

[jsonrpc]
prefix=/api

[rest]
prefix=/rest
security_parsers=\
    vmware.vapi.security.oauth.OAuthSecurityContextParser,\
    vmware.vapi.security.session.SessionSecurityContextParser
session_methods=com.vmware.cis.session.create
allow_cookies=False
# File paths in the following two sections follow from $VAPI-PDK directory since
# that is the directory from which ToyVM service will be started.
# <component-name>_[cli/metamodel].json files are JSON metadata files that are used
# to expose the cli/metamodel services for that component.

[com.vmware.vapi.metadata.cli.source_impl]
sources=common,vclcm
sources.common.filepath=wsgi_properties/metadata/vapi/vapi_common_cli.json
sources.common.type=FILE
sources.vclcm.filepath=wsgi_properties/metadata/vclcm/com.vmware.vcenter.lcm_cli.json
sources.vclcm.type=FILE

[com.vmware.vapi.metadata.metamodel_impl]
sources=common,vclcm,cis
sources.common.filepath=wsgi_properties/metadata/vapi/vapi_common_metamodel.json
sources.common.type=FILE
sources.vclcm.filepath=wsgi_properties/metadata/vclcm/com.vmware.vcenter.lcm_metamodel.json
sources.vclcm.type=FILE
sources.cis.filepath=wsgi_properties/metadata/vapi/com.vmware.cis_metadata.json
sources.cis.type=FILE

[com.vmware.vapi.metadata.authentication_impl]
sources=vclcm
sources.vclcm.filepath=wsgi_properties/metadata/vclcm/com.vmware.vcenter.lcm_authentication.json
sources.vclcm.type=FILE

[vmware.vapi.security.authentication_filter]
handlers=cli_api.provider.authentication_handler.VclcmOAuthHandler

[vmware.vapi.security.authorization_filter]
file=wsgi_properties/metadata/vclcm/com.vmware.vcenter.lcm_authentication.json
handlers=cli_api.provider.authentication_handler.AuthzHandler
#Logger configurations

[loggers]
keys=root

[handlers]
keys=console

[formatters]
keys=default

[logger_root]
level=INFO
handlers=console

[handler_console]
class=logging.StreamHandler
formatter=default
level=INFO
args=(sys.stdout,)

[formatter_default]
format='%(asctime)s %(levelname)-8s %(name)-15s %(message)s'