當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。