[gold-users] Create action processed as Modify?

Allan Streib astreib at indiana.edu
Thu Jan 17 12:05:38 MST 2013


Yes, this explains it.  When the test script runs, it first does:

goldsh DnList Delete

...the intent being to delete what was done in the previous run.  The
script will then "Create" the DnList again, with the same values as
before.

Allan

Scott Jackson <scottmo at adaptivecomputing.com> writes:

> Hi Allan,
>
> I examined the code and I think I know what is going on here. It is likely that you had previously created a DnList with the
> same primary keys and then deleted it. When you delete an object instance in Gold, you do not remove the object from the
> tables, you are merely marking a hidden Deleted field to be True. When you try to run Create, it first looks to see if an
> object with the same primary keys exists, and if so, it unsets the Deleted field and adapts the old object into the new one
> with a Modify command. It is possible that if the new object is exactly the same as the old one, that the newly constructed
> Modify command will not have any assignments in it and will fail. This would seem to be a bug.
>
> If my assumptions are correct, you should be able to use the following instead:
>
> goldsh Action Create Object=DnList Name=Undelete
>
> goldsh DnList Undelete User=='ngnedin' Dn='"/C==US/O=Some other Fake Org/CN=Nickolay Y. Gnedin"'
>
> Thanks,
>
> Scott
>
> On Thu, Jan 17, 2013 at 8:59 AM, Allan Streib <astreib at indiana.edu> wrote:
>
>     Hello,
>    
>     I am working through a test suite script for AMIE/Gold integration.  One
>     of the commands logged by the script is:
>    
>       goldsh DnList Create User='ngnedin' Dn='"/C=US/O=Some other Fake Org/CN=Nickolay Y. Gnedin"'
>       Modify is not a valid action for a DnList object
>    
>     Why would it be trying to "Modify" when the action specified was "Create"?
>    
>     Regardless, I did try:
>    
>       $ goldsh Action Query Object == DnList
>       Object Name   Display Description
>       ------ ------ ------- -----------
>       DnList Delete False
>       DnList Create False
>       DnList Query  False
>    
>       $ goldsh Action Create Object=DnList Name=Modify
>       Successfully created 1 Action
>    
>     Now the result is:
>    
>       $ goldsh DnList Create User='ngnedin' Dn='"/C=US/O=Some other Fake Org/CN=Nickolay Y. Gnedin"'
>       You must specify at least one assignment with a Modify action
>    
>     I don't have any experience with Gold; wondering what else to check to
>     correct this.  Thanks,
>    
>     Allan
>     _______________________________________________
>     gold-users mailing list
>     gold-users at supercluster.org
>     http://www.supercluster.org/mailman/listinfo/gold-users
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users

-- 
 Allan Streib
 Senior Systems Analyst/Programmer, Futuregrid --- Indiana University
 astreib at indiana.edu --- (812) 856-2241 --- skype: allan.streib


More information about the gold-users mailing list