[muranoPL] Class method 'initialize()' is not executed if object created in muranoPl code with command 'new'

Bug #1454264 reported by Dmytro Dovbii
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Stan Lagun

Bug Description

1. Create a simple class:

Namespaces:
  =: io.murano.apps.simple
  ...

Name: SimpleClass

Extends: std:Application

Properties:
  name:
    Contract: $.string().notNull()

Methods:
  initialize:
    Body:
      - $._someVar: 'hello'

  deploy:
    Body:
      - $this.find(std:Environment).reporter.report($this, $._someVar)

2. Create instance of class SimpleClass somewhere in another code

$simpleObj: new(SimpleClass, name => 'testApp')

3. Try to execute method deploy() of created instance:

$simpleObj.deploy()

4. You'll see an exception:

"Access to uninitialized property _someVar in class io.murano.apps.simple.SimpleClass is forbidden"

It means that method 'initialize()' has't been executed.

Dmytro Dovbii (ddovbii)
description: updated
Changed in murano:
milestone: none → 2015.1.1
importance: Undecided → Medium
status: New → Triaged
Changed in murano:
assignee: nobody → Stan Lagun (slagun)
status: Triaged → In Progress
Changed in murano:
assignee: Stan Lagun (slagun) → Ekaterina Chernova (efedorova)
Changed in murano:
assignee: Ekaterina Chernova (efedorova) → Stan Lagun (slagun)
Changed in murano:
assignee: Stan Lagun (slagun) → Ekaterina Chernova (efedorova)
Changed in murano:
assignee: Ekaterina Chernova (efedorova) → Stan Lagun (slagun)
Changed in murano:
assignee: Stan Lagun (slagun) → Ekaterina Chernova (efedorova)
Changed in murano:
assignee: Ekaterina Chernova (efedorova) → Stan Lagun (slagun)
Changed in murano:
assignee: Stan Lagun (slagun) → Ekaterina Chernova (efedorova)
Changed in murano:
assignee: Ekaterina Chernova (efedorova) → Stan Lagun (slagun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/204099
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=425766a7f8ee5ac16a67484c90dc40836dea2ca4
Submitter: Jenkins
Branch: master

commit 425766a7f8ee5ac16a67484c90dc40836dea2ca4
Author: Stan Lagun <email address hidden>
Date: Tue Jul 21 16:56:43 2015 +0300

    Migration to yaql 1.0

    * Code migrated to yaql 1.0.0
    * New MuranoPL object initialization
    * Lots of refactoring

    See referenced specs for more information

    Implements: blueprint migrate-to-yaql-vnext
    Implements: blueprint object-construction
    Depends-on: I7f314634ab5f08a521e51082d5c84dffca4b0b5c
    Closes-Bug: #1454264

    Change-Id: I740a4f83c76d8b56a1da585a739d770ef823a524

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.