

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
why doe this does not work?
/opsw/api/com/opsware/server/ServerService/method
[b42139s@prd-vusaapp12 method](18) $ ./update self:i=180101 ServerVO.use="TEST"
Exception occurred while calling: update
ID: HPSA-005
Code: com.opsware.common.MessageSpec.ILLEGAL_VALUE
Details: vo is set to the illegal value null.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The syntax is probably similar to one of the example scripts in the docs.
https://docs.microfocus.com/itom/Server_Automation:2018.08/API_Unified/Example_Scripts_1
# Create a public static group.
./create "vo={ parent:i=$public_root shortName=’Test Group A’ }"
However, I'd check whether "TEST" is a legit value.
From the twister docs:
public void setUse(java.lang.String use)
Set the intended use of the managed server.
Parameters:
use
- One of: DEVELOPMENT, STAGING, PRODUCTION, or UNKNOWN.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I mean I can create a python script based on the "pytwist Handbook" but I want to understand why and how sh script differ in handling these calls.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The method takes a ServerVO type object as the argument "vo".
I'd recommend to use the getServerVO method to obtain the current data, modify it and then apply your modifications with the update method.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
and how do you do the update after the modification is done on the vo:
method](24) $ vo=`./getServerVO self:i=180101`
./update self:i=180101 ....?....

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The syntax is probably similar to one of the example scripts in the docs.
https://docs.microfocus.com/itom/Server_Automation:2018.08/API_Unified/Example_Scripts_1
# Create a public static group.
./create "vo={ parent:i=$public_root shortName=’Test Group A’ }"
However, I'd check whether "TEST" is a legit value.
From the twister docs:
public void setUse(java.lang.String use)
Set the intended use of the managed server.
Parameters:
use
- One of: DEVELOPMENT, STAGING, PRODUCTION, or UNKNOWN.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks RandomGuy,
TEST is a "use" that you can add in administration/attribute.
Anyway it works if used like this:
./update self:i=180101 "vo={ use="TEST"}" force=true refetch=false
method](76) $ ./getServerVO
{
osFlavor=
hostName="prd-vobrapp02.bbtnet.com"
virtualizationType=1
rebootRequired=false
use="TEST"
origin="ASSIMILATED"


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
We're migrating servers from one mesh to another (new infrastructure) and need to set the values to what they were in the old.
so this also works:
./update self:i=180101 "vo={ use="TEST" stage="LIVE" }" force=true refetch=false

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Given you're requirement we already ship a tool that does this and more.
# less /opt/opsware/support/man/man1/migrate.1
I would avoid reinventing the wheel.