]> review.fuel-infra Code Review - openstack-build/heat-build.git/commit
Implement native nova server resource
authorSteve Baker <sbaker@redhat.com>
Sun, 18 Aug 2013 23:12:59 +0000 (11:12 +1200)
committerSteve Baker <sbaker@redhat.com>
Wed, 28 Aug 2013 22:23:34 +0000 (10:23 +1200)
commit032a3a72713b0322a25de62a5f45844c1e50bf22
tree41cb1e23b4da759d4c39d3c8b604593c13f5cdb5
parente6d4ef61c1d26b24e4a46dbecfc2e9558e1587d1
Implement native nova server resource

Some notes on the implementation:
- extends Resource rather than Instance since most of the
  complexity of Instance is in the handling of the Volumes
  attribute
- exposed properties and attributes map as closely as possible
  to the underlying v1 nova API (rather than the nova client library)
- property or attribute key namespaces have been stripped to provide
  a cleaner API and avoid YAML quoting.
  (eg instance_name -> 'OS-EXT-SRV-ATTR:instance_name')
- an assumption is currently made that any volumes specified
  in block_device_mapping should not be detached on suspend
- Network address properties attempt to cater for simple and
  advanced use-cases:
  - 'first_private_address' and 'first_public_address' for simple
    template attribute scenarios, and to aid with AWS::EC2::Instance
    transition
  - 'networks' for a simple data structure which provides all addresses
  - 'addresses' for the raw data structure returned by the API

Implements blueprint native-nova-instance
Change-Id: I4136da22961c8aa90e3fc8a9411457622f1909fb
heat/engine/resources/server.py [new file with mode: 0644]
heat/tests/test_server.py [new file with mode: 0644]
heat/tests/v1_1/fakes.py