[openstack-dev] [Murano] Changes in Core Library interface

Kostiantyn Snihyr ksnihyr at mirantis.com
Thu Sep 1 11:26:57 UTC 2016



Hi folks,

starting from the Newton release Murano supports multi-region applications deployment [1] and this feature required some changes in the Core Library design. Specifically after this patch references to all region-specific resources are held in the CloudRegion class instead of the Environment class leading to the change of  the 'Environment::defaultNetworks' property contract. The $.class() contracts for the ‘environment’ and ‘flat’ members have been replaced with the $.template() contracts. And now the 'Environment::defaultNetworks' property is a template of the Network class for the region networks.

For application developers it means that you can’t use an ‘Environtment.defaultNetwork.environment’ object for retrieving a default environment network anymore, because semantics of the term “Default environment network” has been changed for multi-cloud deployment. From now on you should retrieve a CloudRegion object from the CloudResource subclasses and ask for a default network for a region.

Warning: existing applications using ‘Environtment.defaultNetwork.environment’ object will be broken after the Newton release.

This change does not affect most of the existing applications but we observe some usage of ‘Environtment.defaultNetwork’  for determining network where Instance was deployed to. To archive same functionality I had extended Instance class [2]  and once this patch will be merged you should use it in the following way

> 
> - $networks: $instance.joinedNetworks
> - For: networkInfo
>   In: $networks
>   Do:
>     - $networkObject: $networkInfo.network
>     - $ipListInNetwork: $networkInfo.ipList
>     - $privateIpListInNetwork: $networkInfo.ipList.where($ != $instance.floatingIpAddress)
> 

If what to determine region default network, you can use following cod

> - $region: $instance.getRegion()
> - $regionDefaultNetworks: $region.defaultNetworks

Please review the change and provide your feedback - [2]

P.S. This patch covers only case with Neutron networks. Patch for Nova networks not ready yet.

References:
[1] https://review.openstack.org/351298 <https://review.openstack.org/351298>
[2] https://review.openstack.org/362036 <https://review.openstack.org/362036>

—
Konstantin Snihyr
IRC: lexplua

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160901/af259452/attachment.html>


More information about the OpenStack-dev mailing list