Menu

#558 [Modelutil::node-set] Resets properties to blank

3.5.1
closed-fixed
9
2010-05-14
2010-05-11
No

When the command is executed in order to set *SOME* of the node's properties, *THE REST* of properties that are not explicitly set are being reset to blank values.

eg:
Command: ctl -p prj -m modelutil -c node-set -- -name AS1 -osfamily cygwin -ctluser salexe

results in "name", "is-family" and "ctluser" set as mentioned, and *ALL OTHER* properties of the node reset to empty values.

Discussion

  • Alex Honor

    Alex Honor - 2010-05-14
    • labels: 954099 --> Modules/Types
    • milestone: --> 3.5.1
    • priority: 5 --> 9
    • assigned_to: nobody --> ahonor
    • status: open --> open-fixed
     
  • Alex Honor

    Alex Honor - 2010-05-14

    Modified the *-set commands to retrieve and use existing resource info in case use does not override via clopt.

    Example:

    Create a resource:

    $ ctl -p demo -m modelutil -c node-set -- -name AS1 -osfamily cygwin -ctluser salexe

    Dump out its info:

    $ ctl -p demo -m modelutil -c find -- -name AS1 -type Node
    #Fri May 14 11:08:48 PDT 2010
    node.Node.AS1.hostname=AS1
    node.Node.AS1.os-version=
    node.Node.AS1.revision=2
    node.Node.AS1.order=Node
    node.Node.AS1.os-family=cygwin
    node.Node.AS1.class=http\://www.opendepo.org/DepOnt\#Node
    node.Node.AS1.ctl-username=salexe
    node.Node.AS1.os-name=
    node.Node.AS1.superclass=Module
    node.Node.AS1.ctl-home=
    node.Node.AS1.mapref-uri=http\://www.opendepo.org/ct/demo/Objects\#obj_6
    node.Node.AS1.name=AS1
    node.Node.AS1.classname=Node
    node.Node.AS1.os-arch=
    node.Node.AS1.doc=
    node.Node.AS1.ctl-base=
    node.Node.AS1.ctl-password-set=false

    Now just set the description but not the osfamily nor ctluser:

    $ ctl -p demo -m modelutil -c node-set -- -name AS1 -description "some descr"

    Dump out the info again. Note, now the preexisting data remains:

    $ ctl -p demo -m modelutil -c find -- -name AS1 -type Node
    #Fri May 14 11:09:40 PDT 2010
    node.Node.AS1.hostname=AS1
    node.Node.AS1.os-version=
    node.Node.AS1.revision=3
    node.Node.AS1.order=Node
    node.Node.AS1.os-family=cygwin
    node.Node.AS1.class=http\://www.opendepo.org/DepOnt\#Node
    node.Node.AS1.ctl-username=salexe
    node.Node.AS1.os-name=
    node.Node.AS1.superclass=Module
    node.Node.AS1.ctl-home=
    node.Node.AS1.mapref-uri=http\://www.opendepo.org/ct/demo/Objects\#obj_6
    node.Node.AS1.name=AS1
    node.Node.AS1.classname=Node
    node.Node.AS1.os-arch=
    node.Node.AS1.doc=some descr
    node.Node.AS1.ctl-base=
    node.Node.AS1.ctl-password-set=false

     
  • Alex Honor

    Alex Honor - 2010-05-14

    moduleforge: Committed revision 2005.

     
  • Alex Honor

    Alex Honor - 2010-05-14
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB