当前位置: 首页>>代码示例>>Python>>正文


Python filemap.FileMap类代码示例

本文整理汇总了Python中osv.modules.filemap.FileMap的典型用法代码示例。如果您正苦于以下问题:Python FileMap类的具体用法?Python FileMap怎么用?Python FileMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FileMap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_module = '${OSV_BASE}/modules/monitoring-agent'

usr_files = FileMap()
usr_files.add(os.path.join(_module, 'monitoring-agent.so')).to('/usr/mgmt/monitoring-agent.so')
usr_files.add(os.path.join(_module, 'cmdline')).to('/init/01-cmdline')

default = ""
开发者ID:151706061,项目名称:osv,代码行数:12,代码来源:module.py

示例2: FileMap

from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path

usr_files = FileMap()

api.require('fonts')
api.require('ca-certificates')
api.require('libz')
api.require('josvsym')

jdkdir = os.path.basename(os.path.expandvars('${jdkbase}'))

usr_files.add('${jdkbase}').to('/usr/lib/jvm/java') \
    .include('lib/**') \
    .include('jre/**') \
    .exclude('jre/lib/security/cacerts') \
    .exclude('jre/lib/audio/**')

usr_files.link('/usr/lib/jvm/' + jdkdir).to('java')
usr_files.link('/usr/lib/jvm/jre').to('java/jre')
usr_files.link('/usr/lib/jvm/java/jre/lib/security/cacerts').to('/etc/pki/java/cacerts')
开发者ID:Atomication,项目名称:osv,代码行数:22,代码来源:module.py

示例3: Copyright

#
# Copyright (C) 2014 Cloudius Systems, Ltd.
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#

from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path

provides = ['java']

api.require('fonts')
api.require('ca-certificates')
api.require('libz')
api.require('josvsym')
api.require('httpserver-jolokia-plugin')
api.require('httpserver-jvm-plugin')

usr_files = FileMap()
usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install').to('/').allow_symlink()
usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install/usr/lib/jvm/java') \
    .to('/usr/lib/jvm/java') \
    .allow_symlink()
usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre')
usr_files.link('/usr/lib/jvm/java/jre/lib/security/cacerts').to('/etc/pki/java/cacerts')
开发者ID:bhuztez,项目名称:osv-apps,代码行数:27,代码来源:module.py

示例4: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_module = '${OSV_BASE}/modules/cloud-init'

usr_files = FileMap()
usr_files.add(os.path.join('${OSV_BASE}', 'external/x64/misc.bin/usr/lib64/libyaml-cpp.so.0.5.1')).to('/usr/lib/libyaml-cpp.so.0.5')
usr_files.add(os.path.join(_module, 'cloud-init.so')).to('/usr/mgmt/cloud-init.so')
usr_files.add(os.path.join(_module, 'cloud-init.yaml')).to('/usr/mgmt/cloud-init.yaml')
usr_files.add(os.path.join(_module, 'cmdline')).to('/init/00-cmdline')

api.require('httpserver')

#default = api.run('/usr/mgmt/cloud-init.so --skip-error --file /usr/mgmt/cloud-init.yaml')
default = ""
开发者ID:5kg,项目名称:osv,代码行数:17,代码来源:module.py

示例5: FileMap

provides = ['java']

from osv.modules.filemap import FileMap
from osv.modules import api

api.require('fonts')

usr_files = FileMap()

usr_files.add('${OSV_BASE}/apps/openjdk8/upstream/install/jvm/openjdk-1.8.0-internal').to('/usr/lib/jvm') \
    .include('lib/**') \
    .include('jre/**') \
    .exclude('jre/lib/security/cacerts') \
    .exclude('jre/lib/audio/**')
开发者ID:amnonh,项目名称:osv-apps,代码行数:14,代码来源:module.py

示例6: Copyright

#
# Copyright (C) 2014 Cloudius Systems, Ltd.
#
# This work is open source software, licensed under the terms of the
# BSD license as described in the LICENSE file in the top-level directory.
#

from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path

provides = ['java']

non_isolated_jvm = True

api.require('fonts')
api.require('ca-certificates')
api.require('libz')
api.require('josvsym')

usr_files = FileMap()
usr_files.add('${OSV_BASE}/apps/openjdk9-ea-java-base/install').to('/').allow_symlink()
usr_files.add('${OSV_BASE}/apps/openjdk9-ea-java-base/install/usr/lib/jvm/java') \
    .to('/usr/lib/jvm/java') \
    .allow_symlink()
usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre')
开发者ID:arunsoman,项目名称:osv-apps,代码行数:26,代码来源:module.py

示例7: FileMap

from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

usr_files = FileMap()

usr_files.add('${OSV_BASE}/mgmt/httpserver/httpserver.so').to('/usr/mgmt/httpserver.so')
usr_files.add('${OSV_BASE}/mgmt/api').to('/usr/mgmt/api')
usr_files.add('${OSV_BASE}/mgmt/swagger-ui/dist').to('/usr/mgmt/swagger-ui/dist')

_cloudius_jar = '/java/cloudius.jar'
_web_jar = '/usr/mgmt/web-1.0.0.jar'
_logging_opts = ['-Djava.util.logging.config.file=/usr/mgmt/config/logging.properties']

shell = run_java(
        classpath=[
            '/usr/mgmt/lib/bcprov-jdk15on-147.jar',
            '/usr/mgmt/lib/bcpkix-jdk15on-147.jar',
            _cloudius_jar,
            _web_jar,
        ],
        args=_logging_opts + [
            '-jar', '/usr/mgmt/crash-1.0.0.jar'
        ])

httpserver = api.run('/usr/mgmt/httpserver.so')

full = [
    shell,
    httpserver,
]
开发者ID:5kg,项目名称:mgmt,代码行数:31,代码来源:module.py

示例8: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_module = '${OSV_BASE}/modules/httpserver-api'

_exe = '/libhttpserver-api.so'

usr_files = FileMap()
usr_files.add(os.path.join(_module, 'libhttpserver-api.so')).to(_exe)
usr_files.add(os.path.join(_module, 'api-doc')).to('/usr/mgmt/api')

api.require('openssl')
api.require('libtools')
api.require('libyaml')

# only require next 3 modules if java (jre) is included in the list of modules
api.require_if_other_module_present('josvsym','java')
api.require_if_other_module_present('httpserver-jolokia-plugin','java')
api.require_if_other_module_present('httpserver-jvm-plugin','java')

# httpserver will run regardless of an explicit command line
# passed with "run.py -e".
daemon = api.run_on_init(_exe + ' &!')

fg = api.run(_exe)

fg_ssl = api.run(_exe + ' --ssl')

default = daemon
开发者ID:imp,项目名称:osv,代码行数:31,代码来源:module.py

示例9: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_module = '${OSV_BASE}/modules/jolokia-agent'


usr_files = FileMap()
usr_files.add(os.path.join(_module, 'target/jolokia-agent.jar')).to('/usr/mgmt/jolokia-agent.jar')
开发者ID:nyh,项目名称:osv,代码行数:10,代码来源:module.py

示例10: FileMap

from osv.modules import api
from osv.modules.filemap import FileMap

api.require("java")

_jar = "/tests/java/tests.jar"
_isolates_jar = "/tests/java/isolates.jar"

usr_files = FileMap()
usr_files.add("${OSV_BASE}/java/tests/target/runjava-tests.jar").to(_jar)
usr_files.add("${OSV_BASE}/java/tests-isolates/target/tests-isolates-jar-with-dependencies.jar").to(_isolates_jar)

usr_files.add("${OSV_BASE}/java/tests-jre-extension/target/tests-jre-extension.jar").to(
    "/usr/lib/jvm/java/jre/lib/ext/tests-jre-extension.jar"
)

default = api.run_java(
    classpath=[_jar, _isolates_jar],
    args=["-Disolates.jar=" + _isolates_jar, "org.junit.runner.JUnitCore", "io.osv.AllTests"],
)
开发者ID:kinwin-ustc,项目名称:osv,代码行数:20,代码来源:module.py

示例11: FileMap

from osv.modules.filemap import FileMap
from osv.modules import api
import os, os.path

usr_files = FileMap()

api.require('fonts')

jdkdir = os.path.basename(os.path.expandvars('${jdkbase}'))
if not os.path.exists('diskimage/usr/lib/jvm'):
    os.makedirs('diskimage/usr/lib/jvm')

def symlink_force(dest, name):
    if os.path.lexists(name):
        os.unlink(name)
    os.symlink(dest, name)

symlink_force('java', 'diskimage/usr/lib/jvm/' + jdkdir)
symlink_force('java/jre', 'diskimage/usr/lib/jvm/jre')

usr_files.add('${jdkbase}').to('/usr/lib/jvm/java') \
    .include('lib/**') \
    .include('jre/**') \
    .exclude('jre/lib/security/cacerts') \
    .exclude('jre/lib/audio/**')
usr_files.add(os.getcwd() + '/diskimage/usr/lib/jvm/' + jdkdir) \
    .to('/usr/lib/jvm/' + jdkdir) \
    .allow_symlink()
usr_files.add(os.getcwd() + '/diskimage/usr/lib/jvm/jre') \
    .to('/usr/lib/jvm/jre') \
    .allow_symlink()
开发者ID:Samsara00,项目名称:osv,代码行数:31,代码来源:module.py

示例12: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_app = '${OSV_BASE}/apps/httpserver-html5-cli'

usr_files = FileMap()
usr_files.add(os.path.join(_app, 'osv-html5-terminal/dist')).to('/usr/mgmt/cli')
usr_files.add(os.path.join(_app, 'httpserver.conf')).to('/etc/httpserver.conf')

api.require('httpserver-api')

# httpserver will run regardless of an explicit command line
# passed with "run.py -e".
_exe = '/libhttpserver-api.so --config-file=/etc/httpserver.conf'
daemon = api.run_on_init(_exe + ' &!')

fg = api.run(_exe)

fg_ssl = api.run(_exe + ' --ssl')
fg_cors = api.run(_exe + ' --access-allow=true')

default = daemon
开发者ID:cloudius-systems,项目名称:osv-apps,代码行数:24,代码来源:module.py

示例13: FileMap

from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

usr_files = FileMap()
usr_files.add('${OSV_BASE}/mgmt/crash/target/dependencies').to('/usr/mgmt/lib')

_crash_jar = '/usr/mgmt/crash-1.0.0.jar'
_cloudius_jar = '/java/cloudius.jar'
_logging_opts = ['-Djava.util.logging.config.file=/usr/mgmt/config/logging.properties']

shell = run_java(
        classpath=[
            _cloudius_jar,
            _crash_jar,
            '/usr/mgmt/lib/*'
        ],
        args=_logging_opts + [
            '-jar', _crash_jar
        ])

# Some CLI commands depend on httpserver presence
_httpserver_module = require('httpserver')

httpserver = _httpserver_module.default
_osvinit_module = require('osvinit')
osvinit = _osvinit_module.default

full = [
    shell,
    httpserver,
开发者ID:amnonh,项目名称:mgmt,代码行数:31,代码来源:module.py

示例14: FileMap

from osv.modules.filemap import FileMap

usr_files = FileMap()
usr_files.add('${OSV_BASE}/modules/lua/src/liblua.so').to('/usr/lib/liblua.so')

usr_files.add('${OSV_BASE}/modules/lua/out').to('/usr')
开发者ID:jaspal-dhillon,项目名称:osv,代码行数:6,代码来源:module.py

示例15: FileMap

import os
from osv.modules.api import *
from osv.modules.filemap import FileMap
from osv.modules import api

_module = '${OSV_BASE}/modules/httpserver-jolokia-plugin'

usr_files = FileMap()
usr_files.add(os.path.join(_module, 'jolokia.so')).to('/usr/mgmt/plugins/jolokia.so')
usr_files.add(os.path.join(_module, 'api-doc/listings/jolokia.json')).to('/usr/mgmt/api/listings/jolokia.json')
usr_files.add(os.path.join(_module, 'jolokia-agent/target/jolokia-agent.jar')).to('/usr/mgmt/jolokia-agent.jar')
开发者ID:carenas,项目名称:osv,代码行数:11,代码来源:module.py


注:本文中的osv.modules.filemap.FileMap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。