Commit Graph

24 Commits

Author SHA1 Message Date
zhurong 81acfe0f17 Add ip_version for NeutronNetwork subnet
Change-Id: I84791c93319dbd70fde436cc538b0e776e2a2a6d
2019-08-22 00:44:12 +00:00
Gerry Buteau 823ec20003 Support shared IP address range
* Add support for range of shared IPs using
  new class SharedIpRange

* Add support for shared IPs on non-external
  networks, floating IP not available in
  this case

Change-Id: I7faa946e99d0070c375408b7f18546a281c668d4
Closes-Bug: #1727349
2017-12-28 03:58:23 +00:00
Paul Bourke 103f67815a Allow users to assign a security group to an app
This patch allows users to supply a list* of their own security groups to
an instance, rather than using the application defined one (built via
the SecurityGroupManager).

* Note, while we can support multiple security groups, murano-dashboard
currently has no UI element to select multiple items. This means that
currently users are restricted to selecting one group. If/when the
UI is improved this change can easily support multiple groups.

Example
=======

Application authors can make this available in their apps as follows:

UI.yaml
-------
Forms:
  - instanceConfiguration:
      fields:
          ...
        - name: securityGroups
          type: securitygroup
          label: Security Group
          required: false

Class.yaml:
----------
  Application:
    ?:
       type: com.paul.HelloWorld
    instance:
      ?:
        type: io.murano.resources.LinuxMuranoInstance
      name: $.instanceConfiguration.hostname
      securityGroups: $.instanceConfiguration.securityGroups
      ...

DocImpact
Change-Id: I60d37cfe034c467e894ee93cf3718e463bf49337
Partially-Implements: blueprint app-use-existing-security-group
2017-04-27 17:37:20 +01:00
Stan Lagun 6f787ab5a2 ExistingNeutronNetwork didn't return IPs for the instance
When deploying an Instance joined to ExistingNeutronNetwork its
ipAddresses property returned an empty list, which was causing most of
the applications to fail. This happened because the responsibility of
managing HOT outputs for the instance IP was moved to the Network
classes and was implemented for the NeutronNetwork but not the
ExistingNeutronNetwork.

This commit moves the logic to the base class for all Neutron networks
and refactors it so that it could be used for them all

Change-Id: I552098683e0faeb66f7c622ea8c1d073a82d6338
Closes-Bug: #1649715
2016-12-13 23:00:48 +00:00
Stan Lagun 753c8cb422 Remove getRegion() calls from network initializers
.init methods of the components are called before
the environment is initialized. Thus regions are not
configured at this point. Thus if the object is not
directly or indirectly owned by the CloudRegion
it cannot call getRegion() from the initializer.

Normally networks do belong to CloudRegion
so there is no problem. However a Network instance
such as ExistingNetwork might be passed to the Instance
class which is not owned by the ClouydRegion and in this
case an exception will be thrown.

Change-Id: I1f3c4f53d4ebc92772c79c9991b19840aa0b0ed7
Closes-Bug: #1633096
2016-10-13 09:25:58 -07:00
Snihyr Kostyantyn 0122dfe1d0 Add joinedNetworks property to Instance class
This commit introduce new Out property in Instance class.
This property contains list of dicts with Network instance and
list of instance`s IPs in this network

Change-Id: I21efa2a69dfcc3fd8d1aae53cca4fbb0933597ee
Closes-bug: #1620269
2016-09-12 14:05:17 -07:00
Stan Lagun bb2d0e5a84 Support for multi-regional apps was added
Now all OpenStack resource classes inherit CloudResource
that provides getRegion method and regionName property.
This allows to assign resources to different regions.
getRegion() returns CloudRegion instance that resource or it
parent belong to. CloudRegion has the similar interface to
Environment class and is the correct way to get HeatStack
instance associated with the regoin, default network
configuration, security group manager and agent listener
instances. Environment acts as the default region so backward
compatibility is not broken. However new applications
should not use environment to set security group rules but
rather a region(s) of their instance(s) in order to work correctly
when their instances were configured to use region other then
the default.

Change-Id: I4dbf40c65042e9a354f3bfadfcd63a63e6e3e418
2016-08-12 07:09:58 -07:00
Stan Lagun 322ba88742 Added property to associate environment with OS region
The Environment class got two additional properties:

region - name of the region where environment should be deployed. If
null then home region is used.

regionConfigs - config property (taken from class config) that specifies
region parameters. It is a dictionary of a form regionName -> regionSettings.
Currently the only setting available is a agentRabbitMq that is itself
a dictionary containing the same options as [rabbitmq] section of murano.conf

Thus the configuration file io.murano.Environment.yaml may look like:

 regionConfigs:
   RegionOne:
     agentRabbitMq:
       host: rabbitMqHostName
       port: 5672
       login: murano
       password: murano
       virtual_host: /
       ssl: false
       ca_certs: null

Implements Blueprint: assign-environment-to-region
Change-Id: I3c84c96f8eeae738f83ed7b3691be38100b30e1d
2016-03-03 18:25:47 +03:00
Dmytro Dovbii c6b9e580a6 [Core-Library] Reset all out properties during releasing
Closes-Bug: #1514779
Change-Id: Ibeae1cda1b62de0d330832cf89f670d5224180c9
2016-02-08 16:17:23 +02:00
Dmytro Dovbii 275b2d2583 [Core-Library] Fix the way of getting DNS in describe() method
This patch changes the method of getting dns address.
Previously dns could be an empty list, if user didn't configured
'default_dns' settings in murano.conf. Now it is taken from already
created subnet.

Change-Id: I5c6a831738e8d971a12bd81eff42aebc869c9a2e
Related-Bug: #1536651
2016-01-27 17:05:30 +00:00
Dmytro Dovbii 3df2ae907c Modify describe method of core-library networking classes
Provides ability to get following information about network
* network name
* network id
* CIDR Range
* gateway IP

implements bp modify-describe-method

Change-Id: Iff59f5c828e2ede42dd0f35eb68046679cf838d3
2015-12-08 15:57:03 +02:00
Lin Yang 46d993702f Add Apache 2.0 license info to core library
Change-Id: Ifa74af1b7c9f3f7a90273def336932ae67509955
Closes-Bug: #1506102
2015-10-15 15:47:03 +08:00
Stan Lagun 9026a8ff82 default_dns from config was never used
NeutronNetwork class was comparing $.dnsNameservers to
null and only then using config parameters. However property
with list contract cannot be null as null (or missing) value will be
converted to empty list

Change-Id: Icc920e8979005446faf5c69eb9f22a1e8b7f054e
Closes-Bug: #1483428
2015-08-11 01:49:16 +03:00
Filip Blaha b897b54859 Making murano components aware of openstack ID
Example: all nova instances have ID now this ID
will be propagated as property on Instance murano
class. Property name is openstackID.

Implements blueprint: murano-core-model-integration-improvements

Change-Id: Ic35aacf635a07befe01cee1482c9fff08a924dc5
2015-08-07 08:08:35 +00:00
Ekaterina Chernova ff9c0c49ea Remove hardcoded dns from config file
If no nameserver list is provided to a neutron subnet,
it uses the DHCP (gateway) address which in turn forwards to dnsmasq.

So dns_nameservers will be set to emptylist in heat templete.

In case user wants to set different dns from default,
he may edit the config parameter, witch is not removed.
The name of parameters is changes to dns_nameservers (with s at the end)
to correspond the same name in heat template.

Change-Id: Iba8b12b8bc78f821e11debb58f20cb713a9dc9c7
Closes-Bug: #1367877
2015-07-17 16:09:45 +03:00
Stan Lagun d22778aa40 Adds describe method to Network implementations
describe methods allows to get network-specific information that will
allow refer to it in Heat template

Change-Id: I1e15b2d682a666c1d26ec194e4852fe2757867fe
Closes-Bug: #1442671
2015-04-10 17:55:57 +03:00
Stan Lagun cc1d5eb5be Fixes instance FIP assignment
YAQL expression for FIP resource were incorrect and left as is (as a string).
Thus  there were single resource for FIP with incorrect name instead of resource
per VM

Change-Id: Ieecdfdb0a7fbad82ef4344b4bac1a55656991e9e
Closes-Bug: #1435787
Closes-Bug: #1435961
2015-03-25 13:22:46 +00:00
Stan Lagun e531698e0c Adds ability to join instances to existing Neutron networks
Also refactores networking code to move networking code from
Instance so that different types of network can be represented by
single simple interface

Implements: blueprint join-existing-neutron-networks
Change-Id: I90afcea6b1c12d7f6f564d8524f5c0d30e1b4686
2015-02-04 03:02:19 +03:00
Andrew Pashkin 3bd3a0ab6e Reverted router_id to router in NeutronNetwork
It is done for compatibility with Juno release of Heat.

Change-Id: I83a9bfce969ef523f3fdd61aec0d82246079a9c2
Closes-Bug: 1413227
2015-01-29 18:49:07 +03:00
Serg Melikyan 884c1032f3 Fix name of the properties for networking resources
Some properties of Neutron resources in Heat were renamed
(e.g. network_id => network in OS::Neutron::RouterInterface),
this change introduces same changes in Core Library.

Change-Id: Ic1f82adb6c325e43c37528a61ac7cebc9b47cfb5
Closes-bug: #1381241
2015-01-20 09:56:18 +03:00
Steve McLellan e7f676635b Fix occasional deletion failure
Stack-delete was failing periodically because of heat bug
https://bugs.launchpad.net/heat/+bug/1299259, whereby there's
an implicit dependency from floating IPs to the router interface.
There is a fix in progress for heat, but until then, this patch
adds an explicit depends_on to the router interface.

Change-Id: I846abf1fbd90d5f5c71b1c13941463743ace48ad
Closes-Bug: 1356721
2014-08-20 15:15:04 +04:00
Alexander Tivelkov ca37b3fe4c Introduce a SharedIp object for Clustering
An io.murano.SharedIp class is added to the Core library.
This class may be used to allocate an IP address which will be later 
assigned to multiple VMs (with usage of "allowed_address_pairs") feature.
A FloatingIP address may be attached to this shared virtual address for further usage from outer world.

Also fixes an issue in NeutronNetwork which caused the net to be redeployed multiple times.

Change-Id: If821348d27c7cd8d90fe11a7f9c9fe9e0e558c03
2014-06-10 09:19:17 +00:00
Stan Lagun 45f002010a Renames 'Workflow' to 'Methods'
Renames name of the section containing class methods.
New name is more OOP and doesn't cause confusion with Mistral.
Old name is still works for backward compatibility

Change-Id: I7f6a4af31983f85283e2c91d0a88b9b42367affa
Implements: blueprint rename-workflow-to-methods
2014-06-09 14:54:48 +04:00
Alexander Tivelkov e387036f4c Move Neutron networking implementation to Core Library
To support future advanced scenarios (such as SharedIP/Cluster groups) it is required to give the Instance
ownership of its port. This requires to move appropriate generation of Heat snippet from Network class
to Instance class.
This makes murano.lib.networks.Neutron package useless, as Neutron-specific leaks to CoreLibrary anyway.
So, it's better to merge these two libs

Also, introduces a concept of "primary network" for instance: this is the net, in which the
floating ip (and other advanced stuff) is allocated.

Change-Id: Ie7eca72901e679707fd63176ced99167eb428646
Targets-blueprint: neutron-net-to-murano-core
2014-06-06 14:55:13 +04:00