⛲
OpenSt­ack 源码­分析之 Magnum
  • 前言
  • 整体结构
  • contrib
  • doc
  • etc
  • magnum
    • api
      • controllers
        • v1
        • base.py
        • link.py
        • root.py
      • middleware
        • auth_token.py
        • parsable_error.py
      • app.py
      • auth.py
      • config.py
      • hooks.py
    • cloud
      • nova_driver.py
    • cmd
      • api.py
      • conductor.py
      • db_manage.py
      • template_manage.py
    • common
      • pythonk8sclient
        • client
        • templates
        • README.rst
      • clients.py
      • config.py
      • context.py
      • docker_utils.py
      • exception.py
      • k8s_manifest.py
      • magnum_keystoneclient.py
      • paths.py
      • policy.py
      • rpc.py
      • rpc_service.py
      • safe_utils.py
      • service.py
      • short_id.py
      • urlfetch.py
      • utils.py
      • yamlutils.py
    • conductor
      • handlers
        • common
        • bay_conductor.py
        • conductor_listener.py
        • docker_conductor.py
        • kube.py
      • tasks
        • heat_tasks.py
        • init.py
      • api.py
      • bay_lock.py
      • config.py
      • template_definition.py
    • db
      • sqlalchemy
        • alembic
        • alembic.ini
        • api.py
        • migration.py
        • models.py
      • api.py
      • migration.py
    • locale
      • magnum-log-critical.pot
      • magnum-log-error.pot
      • magnum-log-info.pot
      • magnum-log-warning.pot
      • magnum.pot
    • objects
      • base.py
      • bay.py
      • baylock.py
      • baymodel.py
      • container.py
      • fields.py
      • node.py
      • pod.py
      • replicationcontroller.py
      • service.py
      • utils.py
      • init.py
    • openstack
      • common
        • _i18n.py
        • cliutils.py
        • eventlet_backdoor.py
        • local.py
        • loopingcall.py
        • periodic_task.py
        • service.py
        • systemd.py
        • threadgroup.py
        • utils.py
        • versionutils.py
    • public
      • css
        • style.css
    • templates
      • docker-swarm
        • fragments
        • COPYING
        • README.md
        • swarm.yaml
        • swarmnode.yaml
      • heat-kubernetes
        • elements
        • fragments
        • COPYING
        • kubecluster-coreos.yaml
        • kubecluster-fedora-ironic.yaml
        • kubecluster.yaml
        • kubeminion.yaml
        • kubenode-coreos.yaml
        • kubenode-fedora-ironic.yaml
        • README.md
    • tests
      • contrib
        • post_test_hook.sh
      • functional
        • test_magnum_python_client.py
        • test_templates.py
      • unit
        • api
        • common
        • conductor
        • db
        • objects
      • base.py
      • config.py
      • conf_fixture.py
      • fakes.py
      • utils.py
    • base.py
    • config.py
    • i18n.py
    • MANIFEST.in
    • opts.py
    • version.py
  • specs
  • tools
  • 架构
Powered by GitBook
On this page
  • contrib
  • devstack
  • doc
  • etc
  • magnum
  • specs
  • tools
  • 其它文档

Was this helpful?

整体结构

源代码主要分为 7 个目录和若干文件: contrib,devstack,doc,etc,magnum,specs 和 tools。 除了这 7 个目录外,还包括一些说明文档、安装需求说明文件等。

contrib

主要包括一个 templates 目录,给出了实现一个 Bay Template 的例子。

devstack

包括将 Magnum 集成到 devstack 中的若干工具和文档。

doc

包括使用 Sphinx 生成文档的相关源码。

etc

跟服务和配置相关的文件,基本上该目录中内容在安装时会被复制到系统的/etc/ 目录下。

magnum

项目核心的代码实现都在这个目录下。 可以通过下面的命令来统计主要实现的核心代码量。

find magnum  -name "*.py" | xargs cat | wc -l

目前版本,约为 46k 行。

specs

项目提出时候的提案文档。

tools

一些相关的代码格式化检测、环境安装的脚本。

其它文档

  • README.rst:介绍了项目的情况和连接。

  • Dockerfile:生成一个 Docker 镜像,默认里面运行 Mangum-api 服务。

Previous前言Nextcontrib

Last updated 5 years ago

Was this helpful?

TESTING.rst:介绍如何进行开发后的测试。官方配置的 jenkins 当 gerrit 上有代码提交 review 的时候会触发 tox 测试。实际上,OpenStack 中的项目使用 来管理测试的虚拟环境,使用 来管理运行测试案例的顺序。

tox
testr