Commit Graph

63 Commits

Author SHA1 Message Date
Christian Berendt
939fbc4463 debug level logs should not be translated
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

Change-Id: I082f925e6923613e1e8cfeb5a0533747087a5e02
2014-05-12 17:15:32 +02:00
Steve McLellan
a3004cd5cf Log unhandled exceptions during task execution
Partially implements blueprint improve-engine-logging
Change-Id: I65196d3216d1c35b7f1d53c1c1e0f0421ecc7c68
2014-05-05 10:06:43 -05:00
Alexander Tivelkov
b7c2aac9a2 Implemented AdvNetworking scenarios via Neutron
Added a new package ( io.murano.lib.networks.Neutron) to handle networking via Neutron
The package introduces a class 'NewNetwork' (io.murano.lib.networks.neutron.NewNetwork)
This class is capable of the following:
 - Create a new Network (L2 segment)
 - Use NetworkExplorer class to allocate an available CIDR
 - Create a new Subnet (L3 segment) in the created Network with the allocated CIDR
 - Use NetworkExplorer class to locate an available router
 - Use NetworkExplorer class to detect the default DNS nameserver
 - Uplink the created subnet to the located router

Also, as this class extends io.murano.resources.Network, it implements the addHostToNetwork method
The implementation creates a Neutron Port and connects that port to a created network and intance

 This commit also modifies the environment-creation logic of the API, allowing to add default networks
 to the Environment object.
 This is a temporary solution: in future the instantiation of this object(s) should be done in MuranoPL

 This commit concludes the minimum set of functionality needed to implement AdvancedNetworking
 in 0.4.x feature set.

 Closes-bug: #1308921

Change-Id: I885620099995b0d402a23def3ff428fb902973d2
2014-04-29 13:02:11 +04:00
Alexander Tivelkov
961818d505 Added NetworkExplorer engine object class
Added a NetworkExplorer class (maps to io.murano.system.NetworkExplorer) to explore
the Network Environment of an active tenant.
The class is able to locate the default router (if present) and allocate available
CIDR range for the selected router. The latter requires some configuration options
(for proper CIDR segmentation)

This commit adds python-neutronclient to the requirements, as NetworkExplorer has
to directly interact with Neutron

This classes is a crucial part of AdvancedNetworking implementation

Partial-Bug: #1308921

Change-Id: Ib9daa1b1521d9bc17a53d7e131be6c9f43faa013
2014-04-29 12:43:41 +04:00
Georgy Okrokvertskhov
1a17a0fe45 Add basic reporting to engine
This patch adds reporting system to engine.
It is used in two major places
a) to report error to API when exception occurs
b) report service status reports to API via workflow as
- $this.find(std:Environment).reporter.report($this, 'Creating VM.')

Change-Id: I7310931482447e174114164ed921bb3fcbfb9d66
2014-04-24 00:08:11 +04:00
Jenkins
c5860f7778 Merge "Fix issue with keystone" 2014-04-22 17:06:16 +00:00
Serg Melikyan
a72df283e2 Fix issue with keystone
Change-Id: Idfeb08fe6946c06b8e6ee933a8ac4b6d62f4406e
Closed-bug: #1310615
2014-04-22 18:55:36 +04:00
Ekaterina Fedorova
14347f9514 Add file limit for a package archive during upload
Change-Id: I2cc5c13f486fc3fc1cc27f375ffc53b2193f62c3
2014-04-22 11:33:19 +04:00
Georgy Okrokvertskhov
26233e56c7 Add CPU info to stats
This patch adds a cpu info to api server stats.
Adds a new requirement psutils

Change-Id: I5644c74b8c22450df0d431e03acb6923d8c15873
2014-04-17 09:44:14 -07:00
Serg Melikyan
443aa5abcb Fix engine results processing
Store applications returned by engine as services

Change-Id: Ib377f163760b067c940482bfd72236c7cc956545
Partial-bug: #1305142
2014-04-16 10:20:09 +04:00
Jenkins
b207905971 Merge "Billing statistics improved" 2014-04-14 16:01:31 +00:00
Ekaterina Fedorova
ad6b8ece18 Support packages in dsl and engine
* Added package property to MuranoClass
   * Added new class loader: PackageClassLoader
   * Support loading packages from API and file-system
   * Extended ApplicationPackage to support getting resources from packages
   * Rewritten ResourceLoader to support loading resources from packages

Co-Authored-By: Serg Melikyan <smelikyan@mirantis.com>
Change-Id: I47e70f960104f78433c285411328f315638186da
2014-04-14 19:03:44 +04:00
Jenkins
246a35b6f9 Merge "Remove deep dependency from muranoapi" 2014-04-14 13:45:30 +00:00
Timur Sufiev
ebc84dcd91 Remove deep dependency from muranoapi
Use `muranoapi.common.utils.is_different` - simplified hand-written
replacement for deep.diff. It compares arbitrary nested objects,
handles circular references, but doesn't return first difference as
deep.diff does.

Change-Id: Iced775fa39342ed09fa31ed9ac63a5dadb9e3f84
2014-04-11 15:44:45 +04:00
Stan Lagun
4dd5c7b2f2 Billing statistics improved
Instance tracking information was improved to contain additional
information on instances such as type name, descriptive title
and number of VMs used by the application.

Added ability to retrieve non-aggregated statistics.
Also instance statistics API refactoring was made.

Implements blueprint app-catalog-billing

Change-Id: I8f3ea1a3947ceaf7deb2ee62b4ad41cbf230596e
2014-04-11 14:54:54 +04:00
Jenkins
84b8d6be9d Merge "Removed dependency from kombu.five" 2014-04-10 12:14:21 +00:00
Serg Melikyan
f36d8bea5d Removed dependency from kombu.five
Replace usage of five.monotonic with simple time.time().

Closes-bug: #1305784

Change-Id: I138d034ef0677f8ecb73cb978860f8d0a0a4df4e
2014-04-10 15:55:14 +04:00
Jenkins
d9e00bf36e Merge "Add migration for inserting default categories" 2014-04-10 11:46:02 +00:00
Timur Sufiev
27dc935a2b Add migration for inserting default categories
Change-Id: I56c53a16b671432872412494e127de5f6e2f7e5d
2014-04-09 20:30:59 +04:00
Stan Lagun
ac6a0dedec Added 'destroy' method that is called on deleted instances
Added ability to modify/remove data from structures (like Heat
templates) via jsonpatch and thus added ability to clean up Heat
resources that was obtained by deleted instances

Closes bug: #1296624

Change-Id: I4db226a5ab00ff363f8b5d44a5d690df942622e8
2014-04-08 16:32:29 +04:00
Ekaterina Fedorova
d0d965642b Fix parentheses in log translation
Translate string before formating

Change-Id: Idef92bde8d873c0455dd97147f7924e8f0cfd432
2014-04-04 13:23:33 +04:00
Stan Lagun
39888fe44f Collection of MuranoPL instance statistics for billing purposes
Implements blueprint app-catalog-billing

Change-Id: Ib3c4b479d82d476629126cb67fe94314fdfecd4f
2014-04-03 00:27:31 +04:00
Stan Lagun
d4c3d21bb4 statistics renamed to request_statistics
Change-Id: I40bd3f7408536b7ecb612cfcc329873b6659da01
2014-04-02 21:14:19 +04:00
Jenkins
58461eb358 Merge "Resolve issues with circular dependency" 2014-04-02 09:35:14 +00:00
Stan Lagun
e006eaf133 Adoption of pre-0.5 environment API to MuranoPL format
This is transitional API with minimum possible changes from API of Murano 0.4

Change-Id: Ic29e4cdbae13c6fdc388c005719aa4235bdccfa6
Closes-bug: #1297791
2014-04-01 17:38:12 +04:00
Stan Lagun
f439c60555 Use native oslo.messaging notification dispatcher
Change-Id: I3bdfa84e9062710e345cb9091e27b9cb076d294d
2014-04-01 10:30:56 +04:00
Serg Melikyan
5958cced52 Resolve issues with circular dependency
* Resolved issues with circular dependencies
 * Updated objects namespaces to the new io.murano.* namespace
 * Resolved a few issues related to not included code from PoC
 * Renamed objects to more pythonic name (back to original actually)

Closes-bug: #1297146
Change-Id: I34641eca33c70908bd44b50f0956abda9d8dbfa7
2014-03-31 15:18:56 +04:00
Jenkins
afdfcc65eb Merge "Lead log spelling to the one style" 2014-03-25 08:42:33 +00:00
Ruslan Kamaldinov
de71c50436 Merged in murano-common
In attempt to reduce number of Murano repositories to a sane minumum Murano
community decided to merge in murano-common repo to projects dependent on it:
* murano-api
* murano-agent

We hope that we will completely get rid of this code in Juno.

Partially-Implements: blueprint repository-reorganization

Change-Id: Ia18958c937b2c983d84b39a5a7849788ed9df6eb
2014-03-22 22:11:47 +04:00
Serg Melikyan
7552552492 Add MuranoPL Engine
Added all missing parts to complete MuranoPL implementation:
 - system classes
 - base classes
 - integration with oslo.messaging
 - package entry-point & other things to run engine
Integrated engine with API

Note: some tests are marked to be skipped,
will be enabled via separate commit.

Partially-Implements: blueprint new-metadata-dsl
Change-Id: I3c1c2326b48da57647d55ea8edfba56f1657d7d6
2014-03-21 15:34:42 +04:00
Ekaterina Fedorova
9940c2f571 Lead log spelling to the one style
Since log is a constant it should be in uppercase everywhere

Change-Id: Ideee9dd5a3f22962b7d53c5790de93bf26f2ea64
2014-03-18 18:35:57 +04:00
Ekaterina Fedorova
457aadf827 Set up logs in config.py in appropriate way
Change-Id: Ia2bb8d7a7c2c86e2028cdd6337ca4d12a77ef648
2014-03-18 10:26:55 +00:00
Georgy Okrokvertskhov
f84e8450da Add per API call statistics
This patch adds a new decorator which calls a stats
collection code to collect usage information per tenant

StatisticsCollection class is added a a stats storage.

Add hostname to stats

As Murano has multi-service deployment it is
necessary to add hostname to each stats
in order to understand which API service
provides them.

Add DB model for stats

This patch adds a new DB model to keep API stats in the DB.
As it is possible to have multiple Murano API servers
we will keep stats for each Murano API instance

Fix stats update to save data to DB

Fixed issues with column names
Added logic to calculate request\sec
and errors\sec based on previous values

Change-Id: Id5c3cdc90700563aff881e5831285a1330a2c034
Partly-Implements: blueprint api-request-stats
2014-03-13 18:42:05 -07:00
Georgy Okrokvertskhov
be0103536d Add Statistics Collection loop
This patch adds a new service which provides
an endless loop to update statistics information.
There is no actual code for stats themselves.

the intension is to save a collected stats to DB
on a periodic basis.

Change-Id: Ia00a5068c2f744b0318a523860ccc5eba225868e
Partly-Implements: blueprint api-request-stats
2014-03-13 08:45:20 -07:00
Serg Melikyan
a8c66b0047 Use oslo.messaging
* Remove muranoapi/openstack/common/rpc
* Remove muranoapi/openstack/common/notifier
* Add ResultEndpoint for handling results from Conductor
* Add ReportNotificationEndpoint for handling reports from Conductor
* Add ConductorClient to send environments to Conductor
* Update murano-api.conf.sample with new RabbitMQ settings
* Clean-up openstack-common from rpc/notifier modules

Change-Id: I4b63f3e2b848143af99dff3c7d39080cc39516a0
2014-03-13 14:35:59 +04:00
Ruslan Kamaldinov
be849df8fa Fix and enable import checks
This patch fixes and enables:
* F401 unused imports
* H301 one import per line
* H302 import only modules
* H306 imports not in alphabetical order

Change-Id: I6f7f92004844184dc4bbea8c3a1ddfc196310b39
2014-03-12 19:29:08 +04:00
Jenkins
dadff4654f Merge "Synchronized Openstack Common" 2014-03-12 13:12:22 +00:00
Alexander Tivelkov
3362ee1337 Synchronized Openstack Common
Change-Id: Id4aedc35c6cd7597fa223360e1f64ecea0ad6517
2014-03-12 14:38:21 +04:00
Ruslan Kamaldinov
5a83cc96ee Remove copyright from empty files
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Change-Id: I5745cf1963f442adc7de2e0f54a3ea39d7bc8edd
2014-03-12 09:12:50 +00:00
Ekaterina Fedorova
968296bf7e Cherry-pick the following commits from release-0.4
* Fix errors in infrastructure
	blueprinr one-style-config
	1) Update sample config - remove non-existing directory
	2) Add 0.4.1 version
	3) Rename config file to sample
	Fixes-Bug: 1270734

* Catch AttributeError in case of incorrect session_id
	Closes-Bug: 1269749

* Fixed issue with copy configuration files.
	Closes-Bug: #1271079

* Add translation support

	Use openstack.common.gettextutils for translation
	Closes-Bug: #1267514

* Fix name for syslog_log_facility param

* Update requirements for a release-0.4.1

* Handle incorrect env_id
	Closes-Bug: 1227154

* Import _ not implicit

Change-Id: I2744eaeef369220c5a8dabb027ba40622be9d155
2014-02-10 18:52:31 +04:00
Jenkins
cdc3d82fef Merge "Support getting and updating network_info of environment." 2013-12-05 12:05:18 +00:00
Timur Sufiev
672bd325d3 Support getting and updating network_info of environment.
Change-Id: I6f0f5fe75cecba1ba78aeebc6e974b314ce5485e
Closes-bug: #1257629
2013-12-05 16:01:03 +04:00
Serg Melikyan
4c9c97b79b Cherry-pick from release-0.3:
*Version bump to 0.3
 *Add delays before reconnect to RabbitMQ

Change-Id: Ia66eab17e0df5b41d7d60dc302c88e0ed08ff401
2013-11-26 20:05:32 +04:00
Serg Melikyan
494bcc5211 Enable HA on declared queues
Change-Id: I57a7ca13580a507f7a51c0ec7078f7f2eaef185e
2013-11-22 18:11:59 +04:00
Timur Sufiev
10650817a9 Porting changes from Release 0.2
* Fix leaking password in murano-api logs (resolved: MRN-861)
* Added function to clean deployment description
* Updated SQLAlchemy requirement
* Changed default values of vhost, login, password (resolved: MRN-880)
* Updated requirements for murano-common
  Now murano-common is installed from pypi and has correct version requirements

Change-Id: I765808820b0ccbdb1d24c776cbe674c00822a3e4
2013-09-09 12:33:34 +04:00
Serg Melikyan
bc87e2f8a7 Cherry-pick following change-ids from release-0.2.
Ie214f0fc9467171b2feb17b2356e834237786bb7
Iaba3df12b2ff0f415ee149e7173529ef2ad31b15

Change-Id: I969361b7a13f57db72ad08f68d98b2730fd0840b
2013-09-03 14:53:39 +04:00
Alexander Tivelkov
0b0b09cf4e Fixed a bug with error and warning state count
Change-Id: I79495ecee3816737e9c31768af6c210906e136eb
2013-07-31 20:00:27 +04:00
Alexander Tivelkov
17853238a3 API now gets and handles conductor exceptions
Change-Id: I843c0004c93873343bf64340975a6ecd02d75814
2013-07-31 18:51:35 +04:00
Stan Lagun
332078e3b7 Updated to muranocommon 0.2 with SSL support
Change-Id: Ibf4ec63332ab1073bda7d1a1cd102cf514284188
2013-07-29 13:25:05 +04:00
Jenkins
311c44e4f6 Merge "Migrated to Murano Common" 2013-07-26 15:28:08 +00:00