Fixed reporting in app development framework
Fixed several reporting-related bugs in io.murano.applications framework: * when reporting was relying on the presence of possibly uninitialized property of Environment * when environment for reporting was not accessible due to property protection level * when reporting was done for an instance object name instead of hostname Closes-bug: #1610997 Change-Id: Id517a511937fa1f65b5fec6bcd0ff5dbe1b33812
This commit is contained in:
parent
8b0b1d5497
commit
a75c16e153
@ -17,6 +17,10 @@ Properties:
|
||||
Contract: $.string()
|
||||
Usage: Runtime
|
||||
|
||||
_env:
|
||||
Contract: $.class(std:Environment)
|
||||
Usage: Runtime
|
||||
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
|
@ -36,12 +36,7 @@ Properties:
|
||||
Methods:
|
||||
.init:
|
||||
Body:
|
||||
- $env: $.find(std:Environment)
|
||||
- If: $env
|
||||
Then:
|
||||
- $this._reporter: $env.reporter
|
||||
Else:
|
||||
- $this._reporter: null
|
||||
- $this._env: $.find(std:Environment)
|
||||
|
||||
deploy:
|
||||
Body:
|
||||
@ -54,9 +49,9 @@ Methods:
|
||||
- instance:
|
||||
Contract: $.class(res:Instance)
|
||||
Body:
|
||||
- If: $this._reporter and name($instance) and not $instance.openstackId
|
||||
- If: $this._env and name($instance) and not $instance.openstackId
|
||||
Then:
|
||||
- $this._reporter.report($this, 'Provisioning VM for ' + name($instance))
|
||||
- $this._env.reporter.report($this, 'Provisioning VM for ' + $instance.name)
|
||||
- $instance.beginDeploy()
|
||||
|
||||
.destroy:
|
||||
|
Loading…
Reference in New Issue
Block a user