deb-murano/murano/common
Alexander Tivelkov 796a0b2c9d Nova Network support
Adds a support for Nova Network if Neutron is not present in the
current OpenStack deployment.

Supporting the Nova Network requires modifications in three different
parts of generated Heat Stack:
	1) Generated Security Groups and their rules should be of type
	   'AWS::EC2::SecurityGroup', not 'OS::Neutron::SecurityGroup'
	2) Security Group assignments should go to security_groups property
	   of Instance resource, not the network port (as port concept is
	   not present when using NovaNetwork)
	3) FloatingIP should be of type OS::Nova::FloatingIP and should be
	   associated with an Instance by OS::Nova::FloatingIPAssociation
	   resource.

To achieve p1 a SecurityGroupManager class of Core Library is made
abstract and is inherited by two concrete implementations:
NeutronSecurityGroupManager (containing the old MuranoPL code which
generated templates based on OS::Neutron::SecurityGroup) and a new
AwsSecurityGroupManager, which generates AWS-compliant firewall rules
which are consumed by NovaNetwork.

The particular concreate instance of this class is generated by the
default network of environment: Network class has got a new method called
generateSecurityGroupManager which returns an appropriate implementation.

For pp 2-3 a new inheritor of Network class has been added to the Core
Library: an io.murano.resources.NovaNetwork. It generates FloatingIP
association resources if needed and returns a securityGroupName object
as one of the outputs of its joinInstance methods.
The Instance class has been modified to properly handle these types of
outputs.
The instance of the NovaNetwork class is generated at the API side
when a new Environment is created and a is assigned to the
defaultNetworks.environment property of the environment if the neutron
is not defined in keystone.

Also this change moves the auth_utils module from engine to common, as
Keystone Client it contains is now used by the API process as well.

This changed is based on some of the code from the outdated changeset
I6f4b7908bd4bbcd375f64705c7dd06e3954f1ec7

Co-Authored-By: Alexander Tivelkov <ativelkov@mirantis.com>
Co-Authored-By: Stan Lagun <slagun@mirantis.com>

DocImpact

Change-Id: I4c48f33de100a5730ba1d086540d0d99e8fbf9b1
Implements-Blueprint: nova-network-support
2015-04-08 13:09:21 +03:00
..
helpers Update from global requirements 2015-02-25 16:09:22 +03:00
messaging Resolve H305 pep8 issue 2015-02-05 12:10:22 +03:00
__init__.py Rename muranoapi to murano 2014-05-27 15:14:44 +04:00
auth_utils.py Nova Network support 2015-04-08 13:09:21 +03:00
config.py Initial implementation of Plugable Classes 2015-03-19 14:06:24 +00:00
consts.py Rename muranoapi to murano 2014-05-27 15:14:44 +04:00
engine.py Nova Network support 2015-04-08 13:09:21 +03:00
exceptions.py Update from global requirements 2015-02-25 16:09:22 +03:00
i18n.py Use oslo.i18n for translation 2015-02-19 18:51:22 +03:00
plugin_loader.py Initial implementation of Plugable Classes 2015-03-19 14:06:24 +00:00
policy.py Update API policy 2015-03-02 15:28:14 +03:00
rpc.py Fixes silent deletion of environments 2014-08-19 12:52:52 +04:00
server.py Adds API to obtain action result 2015-03-02 14:08:36 +03:00
statservice.py Use oslo.i18n for translation 2015-02-19 18:51:22 +03:00
utils.py Use oslo.i18n for translation 2015-02-19 18:51:22 +03:00
uuidutils.py Rename muranoapi to murano 2014-05-27 15:14:44 +04:00
wsgi.py Use oslo.i18n for translation 2015-02-19 18:51:22 +03:00
xmlutils.py Update from oslo incubator 2014-12-10 09:29:14 +00:00