解耦 AWS 和操作系统资源

包含您的 Launchpad 蓝图的 URL

https://blueprints.launchpad.net/heat/+spec/decouple-aws-os-resources

解耦 AWS 和操作系统资源代码。

问题描述

资源文件夹的代码结构有些混乱。 https://blueprints.launchpad.net/heat/+spec/reorganize-resources-code-structure

由于模块(例如:wait_condition.py, instance.py, user.py 和 volume.py)之间存在过多的 AWS 和操作系统资源耦合,因此无法进行重组。

提议的变更

新的代码结构将是

heat
|----engine
     |----resources
          |----aws
               |----wait_condition.py(AWS::CloudFormation::WaitCondition)
               |----wait_condition_handle.py
                    (AWS::CloudFormation::WaitConditionHandle)
               |----volume.py
                    (AWS::EC2::Volume and AWS::EC2::VolumeAttachment)
               |----user.py(AWS::IAM::User and AWS::IAM::AccessKey)
               |----instance.py(AWS::EC2::Instance)
          |----openstack
               |----wait_condition.py(OS::Heat::WaitCondition)
               |----wait_condition_handle.py(OS::Heat::WaitConditionHandle)
               |----volume.py
                    (OS::Cinder::Volume and OS::Cinder::VolumeAttachment)
               |----access_policy.py(OS::Heat::AccessPolicy)
               |----ha_restarter.py(OS::Heat::HARestarter)
          |----wait_condition.py(base module)
     |----volume_tasks.py(volume attach/detach tasks)

并且测试代码也将被拆分

heat
 |----engine
 |----tests
      |----test_waitcondition.py
      |----test_os_waitcondition.py
      |----test_volume.py
      |----test_os_volume.py

备选方案

实现

负责人

主要负责人

huangtianhua <huangtianhua@huawei.com>

里程碑

完成目标里程碑

Kilo-2

工作项

  • 解耦 AWS 和操作系统 WaitCondition 相关资源

  • 解耦 AWS 和操作系统 Volumes 相关资源

  • 解耦 AWS 和操作系统 Instances 相关资源

  • 解耦 AWS 和操作系统 Users 相关资源

  • 解耦响应测试

依赖项