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

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to