openwsman and arrays

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

openwsman and arrays

leapmc

I am looking for an example of the syntax for setting an array property value(s) using wsman and winrm.  Anyone know the proper syntax?

 

Thanks Mike

 

 

Michael C. Leap  |  s-Par Systems Management Architect | ClearPath Solutions

Unisys  |  2476 Swedesford Road  |  Malvern, PA 19355  |  Net 385 | 610-648-2511

<img width=125 height=56 id="_x0000_i1025" src="file:///C:\Users\leapmc\AppData\Roaming\Microsoft\Signatures\Required_Images\Unisys_Logo.gif">


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

 

 


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel

smime.p7s (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: openwsman and arrays

Klaus Kaempf
* Leap, Michael C <[hidden email]> [Jun 14. 2014 17:18]:
> I am looking for an example of the syntax for setting an array property
> value(s) using wsman and winrm.  Anyone know the proper syntax?

Michael,

you need to provide the resource as an xml file and feed this to
wsman/winrm:

  > wsman put ... --input <file> <resource_uri>

  C:\> winrm put <resource_uri> -file:<file>

Use "winrm/wsman get" to get an xml representation to edit.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: openwsman and arrays

leapmc
Klaus,

Can you point me at an example for the format of the xml file?  When I tried with this format I got this error:

Where the xml file 'acquire_lun.xml' look like:
<p:DataLunGuid_INPUT xmlns:p="http://schema.unisys.com/wbem/wscim/1/cim-schema/2/spar/SPAR_PartitionImageComputerSystem">
<p:DataLunGuid>00000009-0000-0000-0000-000000000000</p:DataLunGuid>
<p:DataLunGuid>0000000f-0000-0000-0000-000000000000</p:DataLunGuid>
<p:DataLunGuid>0000000e-0000-0000-0000-000000000000</p:DataLunGuid>
</p:DataLunGuid_INPUT>

I get the return status:

<s:Value>s:Sender</s:Value>
        <s:Subcode>
          <s:Value>wxf:InvalidRepresentation</s:Value>
        </s:Subcode>
      </s:Code>
      <s:Reason>
        <s:Text xml:lang="en">The XML content is not valid.</s:Text>

Thanks
Mike

-----Original Message-----
From: Klaus Kaempf [mailto:[hidden email]]
Sent: Tuesday, July 29, 2014 10:03 AM
To: Leap, Michael C
Cc: [hidden email]
Subject: Re: [Openwsman-devel] openwsman and arrays

* Leap, Michael C <[hidden email]> [Jun 14. 2014 17:18]:
> I am looking for an example of the syntax for setting an array property
> value(s) using wsman and winrm.  Anyone know the proper syntax?

Michael,

you need to provide the resource as an xml file and feed this to
wsman/winrm:

  > wsman put ... --input <file> <resource_uri>

  C:\> winrm put <resource_uri> -file:<file>

Use "winrm/wsman get" to get an xml representation to edit.

Hth,

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel

smime.p7s (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: openwsman and arrays

Klaus Kaempf
* Leap, Michael C <[hidden email]> [Jul 31. 2014 14:44]:
> Klaus,
>
> Can you point me at an example for the format of the xml file?

Run a "wsman get ..." on the resource, this will give you the correct
xml representation.


When I tried with this format I got this error:
>
> Where the xml file 'acquire_lun.xml' look like:
> <p:DataLunGuid_INPUT xmlns:p="http://schema.unisys.com/wbem/wscim/1/cim-schema/2/spar/SPAR_PartitionImageComputerSystem">
                ^^^^^^

This tag is for 'wsman invoke ...' parameters and wrong for 'wsman set
...' resources.

Klaus
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel