<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>VLAN &amp; VSAN Template interfaces</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>VLAN &amp; VSAN Template interfaces</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_recent_posts?p_l_id=</id>
  <updated>2013-05-25T03:28:15Z</updated>
  <dc:date>2013-05-25T03:28:15Z</dc:date>
  <entry>
    <title>RE: xml api curl for UCS C240</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9888387" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9888387</id>
    <updated>2013-01-03T15:23:09Z</updated>
    <published>2013-01-03T15:23:09Z</published>
    <summary type="html">Hi,
 
There is a typo in the blog, the POST body should be in single quotes like this 
curl -H "Content-Type: text/xml" -N -s -d '&lt;aaaLogin inName="ucsrouser" inPassword="cisco@123" /&gt;' http://10.10.10.10/nuova
I will update the blog.
 
Regards,
John
[quote=alexey gan]Hi,
We have severalUCS C240 servers and based on this example :
curl -H "Content-Type: text/xml" -N -s -d "&lt;aaaLogin inName="ucsrouser" inPassword="cisco@123" /&gt;" http://10.10.10.10/nuova
From this link

http://developer.cisco.com/web/unifiedcomputing/blogroll/-/blogs/ucs-xml-api-curl-and-xml?_33_redirect=http://developer.cisco.com/web/unifiedcomputing/blogroll?p_p_id=33&amp;p_p_lifecycle=0&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-1&amp;p_p_col_count=1&amp;_33_advancedSearch=false&amp;_33_keywords=&amp;_33_delta=5&amp;p_r_p_564233524_resetCur=false&amp;_33_cur=4&amp;_33_struts_action=%2Fblogs%2Fview&amp;_33_andOperator=true
This is the the output that we receive: 
XML PARSING ERROR: Unable to parse the XML API request. Bad XML document.
What is wrong ?
 [/quote]</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2013-01-03T15:23:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Get Open Slots in Chassis via Powertool</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=6067686" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=6067686</id>
    <updated>2012-07-11T20:08:55Z</updated>
    <published>2012-07-11T20:08:55Z</published>
    <summary type="html">[quote]Hi All,
 
I have an environment consisiting of 20+ chassis ... I'd like to be able to get the number of open blade slots on each of these. 
 
I'm sure there has to be a command i can put together for this. 
 
Any ideas?
 
Thanks,

JD[/quote]
Hi JD,
 
Something like this should work
 

PS C:\Users\John McDonough\Documents&gt; Get-UcsFabricComputeSlotEp -Presence empty | Select-Object dn,chassisId,Rn
 
Dn                                      ChassisId                               Rn
--                                      ---------                               --
fabric/server/chassis-1/slot-5          1                                       slot-5
fabric/server/chassis-1/slot-6          1                                       slot-6
fabric/server/chassis-1/slot-7          1                                       slot-7
fabric/server/chassis-1/slot-8          1                                       slot-8




Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2012-07-11T20:08:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: PowerTool - Get-UcsFabricPort output bug?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5831578" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5831578</id>
    <updated>2012-06-06T22:55:35Z</updated>
    <published>2012-06-06T22:55:10Z</published>
    <summary type="html">I was trying to map between FI's server port and Chassis IOM's fabric port, using Get-UcsFabricPort cmdlet.
The output of the cmdlet has PeerChassisId as N/A, while PeerDn clearly shows the Chassis id:
PeerChassisId  : N/A
PeerDn         : sys/chassis-1/slot-1/fabric/port-1
Could it be a bug at the output of this cmdlet?


 
Hi Jason,
 
it's not a bug in Get-UcsFabricPort, that cmdlet is faithfully retreiveing the etherPIo objects in the UCS Managment Information Tree. Take alook at the output below, it is probably very similar to what you are seeing 
 
 
PS C:\&gt; Get-UcsFabricPort -Dn sys/switch-B/slot-1/switch-ether/port-1
 
 
AdminState     : enabled
AdminTransport : ether
ChassisId      : 1
Encap          : unknown
EpDn           : fabric/server/sw-B/slot-1-port-1
IfRole         : server
IfType         : physical
Lc             : available
LicGP          : 0
LicState       : unknown
Locale         : internal
Mac            : 00:07:85:00:00:01
Mode           : fabric
Model          :
Name           :
OperSpeed      : 188
OperState      : up
PeerChassisId  : N/A
PeerDn         : sys/chassis-1/slot-2/fabric/port-1
PeerPortId     : 1
PeerSlotId     : 2
PortId         : 1
Revision       : 0
Serial         :
SlotId         : 1
StateQual      :
SwitchId       : B
Transport      : {ether}
Ts             : 1970-01-01T01:00:00.000
Type           : lan
UnifiedPort    : no
UsrLbl         :
Vendor         :
XcvrType       : unknown
Dn             : sys/switch-B/slot-1/switch-ether/port-1
Rn             : port-1
Status         :
Ucs            : machine
 
 
Now you can add the -Xml option to the cmdlet and your can see the raw XML that goes to and is returned from the Fabric Interconnect.  If you do that for Get-UcsFabricPort you'll see that the XML does not contain a value either. I formated the output a little bit for easier reading.
 
 
PS C:\&gt; Get-UcsFabricPort -Dn sys/switch-B/slot-1/switch-ether/port-1 -Xml
==&gt;machine:
&lt;configResolveClass classId="etherPIo" inHierarchical="false"&gt;
  &lt;inFilter&gt;
    &lt;eq class="etherPIo" property="dn" value="sys/switch-B/slot-1/switch-ether/port-1" /&gt;
  &lt;/inFilter&gt;
&lt;/configResolveClass&gt;
 
&lt;==machine: 
&lt;configResolveClass cookie="" response="yes" classId="etherPIo"&gt;
  &lt;outConfigs&gt;  
    &lt;etherPIo adminState="enabled" adminTransport="ether" chassisId="1"  dn="sys/switch-B/slot-1/switch-ether/port-1" encap="unknown" epDn="fabric/server/sw-B/slot-1-port-1" fltAggr="0" fsmDescr="" fsmPrev="nop" fsmProgr="100" fsmRmtInvErrCode="none" fsmRmtInvErrDescr="" fsmRmtInvRslt="" fsmStageDescr="" fsmStamp="never" fsmStatus="nop" fsmTry="0" ifRole="server" ifType="physical" lc="available" licGP="0" licState="unknown" locale="internal" mac="00:07:85:00:00:01" mode="fabric" model="" name="" operSpeed="52" operState="up" [b]peerChassisId="N/A"[/b] peerDn="sys/chassis-1/slot-2/fabric/port-1" peerPortId="1" peerSlotId="2" portId="1" revision="0"  serial="" slotId="1" stateQual=""  switchId="B" transport="ether" ts="1970-01-01T01:00:00.000" type="lan" unifiedPort="no" usrLbl="" vendor="" xcvrType="unknown"/&gt;
  &lt;/outConfigs&gt;
&lt;/configResolveClass&gt;
 
Hope that helps, what the peerChassisId attribute is intended for and why it says "N/A"? I don't know, perhaps a future feature.
 
Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2012-06-06T22:55:10Z</dc:date>
  </entry>
  <entry>
    <title>RE: Collect CPU speeds via UCS PowerTool...</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5727472" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5727472</id>
    <updated>2012-05-14T21:40:15Z</updated>
    <published>2012-05-14T21:40:15Z</published>
    <summary type="html">[quote]Hi all,
 
I'm trying to get the CPU speed from the blades I have installed as part of an inventory script.  The Get-UcsBlade commandlet gets me most of what I need, but I can't seem to find where I'd get the speeds from.  Anyone have any suggestions?
 
Thanks,
 
Sage[/quote]
Hi Sage,
 
There are at least two ways to get to the information you are looking for;
 
- Directly by using the Get-UcsProcessorUnit cmdlet
 
- Through the structure of the Object Model
  - Get-UcsBlade | Get-UcsComputeBoard | Get-UcsProcessorUnit
 
Running Get-Help for each one of those commands with show you the input object that is being looked for, as well as other filering options.
 
Hope that helps, example below.
 
Regards,
John
 
Here's the output for blade 1/1

PS C:\&gt; Get-UcsBlade -ServerId 1/1 | Get-UcsComputeBoard | Get-UcsProcessorUnit
 
 
Arch              : Xeon
Cores             : 4
CoresEnabled      : 4
Id                : 1
Model             : Intel(R) Xeon(R) CPU           E5540  @ 2.53GHz
OperState         : operable
Operability       : unknown
Perf              : unknown
Power             : not-supported
Presence          : equipped
Revision          : 0
Serial            :
SocketDesignation : CPU1
Speed             : 2.530000
Stepping          : 4
Thermal           : ok
Threads           : 8
Vendor            : Intel(R) Corporation
Visibility        : yes
Voltage           : not-supported
Dn                : sys/chassis-1/blade-1/board/cpu-1
Rn                : cpu-1
Status            :
Ucs               : machine
 
Arch              : Xeon
Cores             : 4
CoresEnabled      : 4
Id                : 2
Model             : Intel(R) Xeon(R) CPU           E5540  @ 2.53GHz
OperState         : operable
Operability       : unknown
Perf              : unknown
Power             : not-supported
Presence          : equipped
Revision          : 0
Serial            :
SocketDesignation : CPU2
Speed             : 2.530000
Stepping          : 4
Thermal           : ok
Threads           : 8
Vendor            : Intel(R) Corporation
Visibility        : yes
Voltage           : not-supported
Dn                : sys/chassis-1/blade-1/board/cpu-2
Rn                : cpu-2
Status            :
Ucs               : machine</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2012-05-14T21:40:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: Powertool - how to import config backup file</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5416318" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=5416318</id>
    <updated>2012-04-06T14:48:09Z</updated>
    <published>2012-04-06T14:48:09Z</published>
    <summary type="html">[quote]Hi Experts,
 
I tried Backup-Ucs command with Powertool 9.6.0 and got backup file successfully.
but there seems to be no cmdlet to execute restoreing (importing) the file back into UCS Manager.
 
Do anyone know how to import it by Powertool?
 
Regards,
Hiroshi
 
 [/quote]
Hi Hiroshi,
 
There are several cmdlets to manage import of an XML backup that was taken from the UCS Manager and the import process, the several I have listed below are from the 0.9.7.0 release.
 


PS C:\&gt; get-command -Module CiscoUCSPS | select-string import
 
Add-UcsMgmtImporter
Get-UcsMgmtImporter
Import-UcsBackup
Import-UcsXml
Remove-UcsMgmtImporter
Set-UcsMgmtImporter


 
The backup that  results fro Backup-Ucs with the option "full-state" is not an XML file, it is a binary dump of the UCS Manager database and cannot be imported, only restored.  The restore backup capability is only available from the commandline.  You would be presented with the setup/restore option when there is no existing configuration on the UCS.
 
There maybe a way to force the initial setup process on a UCS with an existing configuration, but I an not familiar with it.
 
Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2012-04-06T14:48:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Setting VSAN / VLAN on vNIC / vHBA templates with 0.9.0.1</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4814241" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4814241</id>
    <updated>2011-11-29T23:51:58Z</updated>
    <published>2011-11-29T23:51:58Z</published>
    <summary type="html">Hi Jonathan,

Your only option at this point is the Invoke-XML, now called Invoke-UcsXml. Here is an example of the new cmdlet


PS C:\Program Files\Cisco\Cisco UCS PowerTool&gt; Add-UcsVhbaTemplate -Name vHBA-A-Side -SwitchId A -TemplType updating-template

Descr               :
IdentPoolName       :
MaxDataFieldSize    : 2048
Name                : vHBA-A-Side
NwCtrlPolicyName    :
OperIdentPoolName   :
OperQosPolicyName   :
OperStatsPolicyName :
PinToGroupName      :
QosPolicyName       :
StatsPolicyName     : default
SwitchId            : A
Target              : adaptor
TemplType           : updating-template
Dn                  : org-root/san-conn-templ-vHBA-A-Side
Rn                  : san-conn-templ-vHBA-A-Side
Status              : created
Ucs                 : ucs-as-rtp-6140-01



PS C:\Program Files\Cisco\Cisco UCS PowerTool&gt; invoke-ucsxml -XmlQuery "&lt;configConfMo&gt;&lt;inConfig&gt;&lt;vnicFcIf dn='org-root/san-conn-templ-vHBA-A-Side/if-default' name='VSAN100' /&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"
 
&lt;configConfMo dn="" cookie="1322598760/321871d6-ac69-4bfe-8907-71fac409303d" response="yes"&gt; &lt;outConfig&gt; &lt;vnicFcIf  dn="org-root/san-conn-templ-vHBA-A-Side/if-default" initiator="00:00:00:00:00:00:00:00" name="VSAN100" operState="indeterminate" operVnetDn="" operVnetName="" owner="logical"  status="created" switchId="A" type="fc" vnet="1"/&gt; &lt;/outConfig&gt; &lt;/configConfMo&gt;


PS C:\Program Files\Cisco\Cisco UCS PowerTool&gt; Add-UcsVhbaTemplate -Name vHBA-B-Side -SwitchId B -TemplType updating-template

Descr               :
IdentPoolName       :
MaxDataFieldSize    : 2048
Name                : vHBA-B-Side
NwCtrlPolicyName    :
OperIdentPoolName   :
OperQosPolicyName   :
OperStatsPolicyName :
PinToGroupName      :
QosPolicyName       :
StatsPolicyName     : default
SwitchId            : B
Target              : adaptor
TemplType           : updating-template
Dn                  : org-root/san-conn-templ-vHBA-B-Side
Rn                  : san-conn-templ-vHBA-B-Side
Status              : created
Ucs                 : ucs-as-rtp-6140-01


PS C:\Program Files\Cisco\Cisco UCS PowerTool&gt; invoke-ucsxml -XmlQuery "&lt;configConfMo&gt;&lt;inConfig&gt;&lt;vnicFcIf dn='org-root/san-conn-templ-vHBA-B-Side/if-default' name='VSAN200' /&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"
 
&lt;configConfMo dn="" cookie="1322598760/321871d6-ac69-4bfe-8907-71fac409303d" response="yes"&gt; &lt;outConfig&gt; &lt;vnicFcIf  dn="org-root/san-conn-templ-vHBA-B-Side/if-default" initiator="00:00:00:00:00:00:00:00" name="VSAN200" operState="indeterminate" operVnetDn="" operVnetName="" owner="logical"  status="created" switchId="A" type="fc" vnet="1"/&gt; &lt;/outConfig&gt; &lt;/configConfMo&gt;

I had thought perhaps that I would be able to use the AddChild member method of the vHBA Template, so I

- Created the template with Add-UcsVhbaTemplate
- Retrieved the template with Get-UcsVhbaTemplate
- Created a new object of type Cisc.Ucs.vnicFcIf with a properties hashtable that contained the name of the VSAN, using New-Object
- Used the AddChild member method of the vHBA template
- Pushed the updated vHBA template object to the UCS with Set-UcsVhbaTemplate

But that didn't work, so I used Invoke-UcsXml

Hope that helps
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-11-29T23:51:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: What is the syntax of eventSendEvent</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4811959" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4811959</id>
    <updated>2011-11-29T16:09:48Z</updated>
    <published>2011-11-29T16:09:48Z</published>
    <summary type="html">Kresten,
 
[quote]According to the documentation the client can use eventSendEvent to retrieve missed event.
 
What is the syntax of this API call. There don't seem to be any examples or other documentation on this API call. Is there anyone who have an example or more detailed documentation on that API call?[/quote]
 
The eventSendEvent is not the correct method to use, the methods you want to use are configResolveDn if you are looking for a single event or configResolveClass with with a composite filter for multiple events. For example if you have missed event 5232129 use configResolveDn to retrieve that event like this
 

&lt;configResolveDn  dn="event-log/5232129"
	cookie="1322577009/78d11c95-8ced-45af-91e3-c387639bff8f" /&gt; 

 
And get this response
 
&lt;configResolveDn dn="event-log/5232129" cookie="1322577009/78d11c95-8ced-45af-91e3-c387639bff8f" response="yes"&gt;
  &lt;outConfig&gt;
    &lt;eventRecord affected="sys/chassis-1/blade-3" cause="transition" changeSet=""  code="E4195059" created="2011-03-27T19:58:10.582" descr="[FSM:STAGE:STALE-SUCCESS]: configuring primary fabric interconnect access to server 1/3(FSM-STAGE:sam:dme:ComputeBladeDiscover:ConfigFeLocal)" dn="event-log/5232129" id="5232129" ind="state-transition"  severity="info"  trig="special" txId="294448" user="internal"/&gt;
  &lt;/outConfig&gt;
&lt;/configResolveDn&gt;
 
 
If you missed events 5232128 through 5232130 use configResolveClass with an and filter like this
 
 
&lt;configResolveClass classId="eventRecord" cookie="1322577009/78d11c95-8ced-45af-91e3-c387639bff8f" &gt;
  &lt;inFilter&gt;
    &lt;and&gt;
      &lt;ge class="eventRecord" property="id" value="5232128" /&gt;
      &lt;le class="eventRecord" property="id" value="5232130" /&gt;
    &lt;/and&gt;
  &lt;/inFilter&gt;
&lt;/configResolveClass&gt;
 
 
And get this response
 
&lt;configResolveClass cookie="1322577009/78d11c95-8ced-45af-91e3-c387639bff8f" response="yes" classId="eventRecord"&gt;
  &lt;outConfigs&gt;
    &lt;eventRecord affected="sys/chassis-1/blade-1" cause="transition" changeSet=""  code="E4195060" created="2011-03-27T19:58:10.457" descr="[FSM:STAGE:ASYNC]: configuring secondary fabric interconnect access to server 1/1(FSM-STAGE:sam:dme:ComputeBladeDiscover:ConfigFePeer)" dn="event-log/5232128" id="5232128" ind="state-transition"  severity="info"  trig="special" txId="294447" user="internal"/&gt;  &lt;eventRecord affected="sys/chassis-1/blade-3" cause="transition" changeSet=""  code="E4195059" created="2011-03-27T19:58:10.582" descr="[FSM:STAGE:STALE-SUCCESS]: configuring primary fabric interconnect access to server 1/3(FSM-STAGE:sam:dme:ComputeBladeDiscover:ConfigFeLocal)" dn="event-log/5232129" id="5232129" ind="state-transition"  severity="info"  trig="special" txId="294448" user="internal"/&gt;  &lt;eventRecord affected="sys/chassis-1/blade-3" cause="transition" changeSet=""  code="E4195059" created="2011-03-27T19:58:10.583" descr="[FSM:STAGE:END]: configuring primary fabric interconnect access to server 1/3(FSM-STAGE:sam:dme:ComputeBladeDiscover:ConfigFeLocal)" dn="event-log/5232130" id="5232130" ind="state-transition"  severity="info"  trig="special" txId="294448" user="internal"/&gt;
  &lt;/outConfigs&gt;
&lt;/configResolveClass&gt;
 
Hope that helps.
 
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-11-29T16:09:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to get Fabric Interconnects with Powershell?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578136" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578136</id>
    <updated>2011-10-06T19:11:26Z</updated>
    <published>2011-10-06T19:11:26Z</published>
    <summary type="html">Use the class networkElement in a configResolveClass query with the Invoke-XmlCommand as shown below

[font=Courier New]PS C:\&gt; Connect-UCSM 172.21.60.72

cmdlet Connect-UCSM at command pipeline position 1
Supply values for the following parameters:
Credential
UCS Connection successful


Name               : 172.21.60.72
ConnectionInstance : CurrentUCSMInstance
Port               : 443
User               : admin
UserRole           : admin
UserPrivilege      : read-only
SSL                : True
SessionID          : web_57037_A
LastUpdatedTime    : 10/6/2011 2:03:25 PM
RefreshPeriod      : 600
Credential         : System.Management.Automation.PSCredential
UcsUri             : https://172.21.60.72/nuova
Cookie             : 1317924195/47b6dbbe-00e2-4e88-909c-e03258a5935f
Version            : 1.4(1j)



PS C:\&gt; Invoke-XmlCommand -XMLStringList "&lt;configResolveClass classId='networkElement' inHierarchical='false' /&gt;"


adminInbandIfState : disable
dn                 : sys/switch-A
fltAggr            : 12884901888
id                 : A
inbandIfGw         : 0.0.0.0
inbandIfIp         : 0.0.0.0
inbandIfMask       : 0.0.0.0
inbandIfVnet       : 0
model              : N10-S6100
oobIfGw            : 172.21.60.65
oobIfIp            : 172.21.60.70
oobIfMask          : 255.255.255.224
operability        : operable
revision           : 0
serial             : SSI12480267
totalMemory        : 3549
vendor             : Cisco Systems, Inc.

adminInbandIfState : disable
dn                 : sys/switch-B
fltAggr            : 4294967297
id                 : B
inbandIfGw         : 0.0.0.0
inbandIfIp         : 0.0.0.0
inbandIfMask       : 0.0.0.0
inbandIfVnet       : 0
model              : N10-S6100
oobIfGw            : 172.21.60.65
oobIfIp            : 172.21.60.71
oobIfMask          : 255.255.255.224
operability        : operable
revision           : 0
serial             : SSI12480261
totalMemory        : 3549
vendor             : Cisco Systems, Inc.[/font]

Hope that helps</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-10-06T19:11:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: XML Schema for UCS XML API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578086" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578086</id>
    <updated>2011-10-06T19:06:53Z</updated>
    <published>2011-10-06T19:06:53Z</published>
    <summary type="html">Jason,

An emulator for 2.0(1m) is not currently available, I do not have a time frame when one will be.

John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-10-06T19:06:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: XML Schema for UCS XML API</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578068" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578068</id>
    <updated>2011-10-06T18:55:26Z</updated>
    <published>2011-10-06T18:55:26Z</published>
    <summary type="html">The emulator does have a link for API Schema and Samples, but as correctly stated it does not include the schema.

I have posted the schema for the two latest releases of UCS Fimware, 1.4(3q) and 2.0(1m) here http://developer.cisco.com/web/unifiedcomputing/docs</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-10-06T18:55:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: Adding updating parameter to add-VhbaTemplate and add-VnicTemplate</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578010" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4578010</id>
    <updated>2011-10-06T18:31:03Z</updated>
    <published>2011-10-06T18:31:03Z</published>
    <summary type="html">[quote]Hi There;
 
It doesn't appear that the applets have implemented the Type parameter for updating (vs static) for add-vhbaTemplate and add-vnicTemplate? I do see this parameter implemented for Add-SPTemplate.
 
Am I missing something? Any suggestions (and syntax) for an alternate method of setting this parameter ie through Invoke-XMLCommand perhaps?
 
Thanks;
sash[/quote]
 
Hi Sash,
 
You are not missing anything, the vnic and vhba template types are not settable with the template cmdlets.  Hope to work around that is covered in this thread [url=http://developer.cisco.com/web/unifiedcomputing/forums/-/message_boards/view_message/4452902]http://developer.cisco.com/web/unifiedcomputing/forums/-/message_boards/view_message/4452902[/url]
 
It would involve, as you guessed, Invoke-XxmlCommand
 
Regards
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-10-06T18:31:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Create backup configuration using Invoke-XML (and a quick-tip)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4541112" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4541112</id>
    <updated>2011-09-27T15:11:23Z</updated>
    <published>2011-09-27T15:11:23Z</published>
    <summary type="html">The next release of the PowerShell library will have a significant number of cmdlets, probably in the 1300+ range, hope that isn't too scary.  However the benefit is that there will be cmdlets for every conceivable activity. It should be released soon.

I typically capture traffic when I'm working on a script, take a look at the documents here, http://developer.cisco.com/web/unifiedcomputing/docs

As well download the UCS Emulator to get a copy of the object model documents, if you have not already done so.

John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-09-27T15:11:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Create backup configuration using Invoke-XML (and a quick-tip)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4540980" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4540980</id>
    <updated>2011-09-27T13:53:58Z</updated>
    <published>2011-09-27T13:53:58Z</published>
    <summary type="html">Jan,

For the backup object you have specified an attribute that is not user configurable, childAction.  I ran your setting through the UCS Manager and captured the traffic and captured this configConfMo object

This is what I sent

&lt;configConfMo cookie="1317127772/a58edda9-d781-4363-903c-c8ff47f4e3d9" inHierarchical="false"&gt;
    &lt;inConfig&gt;
        &lt;mgmtBackup
        adminState="enabled"
        hostname="10.10.10.10"
        descr=""
        preservePooledValues="no"
        proto="ftp"
        pwd="password"
        remoteFile="/Cisco UCS/system-backup.bak"
        rn="backup-10.10.10.10"
        type="config-all"
        user="user.backup"&gt;
        &lt;/mgmtBackup&gt;
    &lt;/inConfig&gt;
&lt;/configConfMo&gt;


And this is what I got back

&lt;configConfMo dn="" cookie="1317127772/a58edda9-d781-4363-903c-c8ff47f4e3d9" response="yes"&gt;
  &lt;outConfig&gt;
    &lt;mgmtBackup 
      adminState="enabled"
      descr=""
      dn="sys/backup-10.10.10.10"
      fsmDescr=""
      fsmPrev="nop"
      fsmProgr="100"
      fsmRmtInvErrCode="none"
      fsmRmtInvErrDescr=""
      fsmRmtInvRslt=""
      fsmStageDescr=""
      fsmStamp="never"
      fsmStatus="backupBegin"
      fsmTry="0" hostname="10.10.10.10"
      intId="2357186"
      job="immediate"
      name=""
      postAction="remove"
      preservePooledValues="no"
      proto="ftp" pwd=""
      remoteFile="/Cisco UCS/system-backup.bak"
      status="created"
      type="config-all"
      user="user.backup"/&gt;
  &lt;/outConfig&gt;
&lt;/configConfMo&gt;

This failed for me because I don't have a 10.10.10.10 ftp host but should work for you, hope that helps.

John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-09-27T13:53:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Looks like bug in UCSM 1.4 (using XMLAPI)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4522035" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4522035</id>
    <updated>2011-09-21T17:16:22Z</updated>
    <published>2011-09-21T17:16:22Z</published>
    <summary type="html">You should query and get the boot policy that you are looking to change first, determine the boot orders affected then do your updates accordingly.

The API allows for manipulation of multiple objects at the same time, what would happen if I attempted to change the boot order of 3 boot objects at the same time, what would be swapped then? 

Instead of swapping I think the API should respond to a request that causes multiple use of the same boot order with an error. For example if I try to utilize the same boot order in a boot policy in the CLI, the CLI responds with this error.

  Software Error: Order should be unique among bootdevices.

Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-09-21T17:16:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: Looks like bug in UCSM 1.4 (using XMLAPI)</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4521871" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4521871</id>
    <updated>2011-09-21T16:08:54Z</updated>
    <published>2011-09-21T16:08:54Z</published>
    <summary type="html">Answered in the support forums, posted here as well

Dilip,
 
The API is operating correctly, processing the XML that was sent to approriately.  The XML code is setting the Floppy object boot order to 1 which resulted in what you see in the boot policy shown in the GUI.
 
The GUI builds the XML based on what is requested and "helps" the GUI user, in the case of a boot policy by modifying the order number of the above or below boot option depending upon which direction the boot option is moved.
 
The XML code sent to the UCS Manager by the GUI will send the code for ALL the affected boot objects.  The code your application needs to do the same.
 
If you want the Floppy to be order 1 then the boot object that is order 1 needs to become the order of what the Floppy was, in your picture that would be the Local Disk.
 
You code needs to look like this, the difference is the addition of the Local Disk object.  Also please notice that I am changing a boot policy called "localboot" not "default"
 
&lt;configConfMos inHierarchical="true" cookie="1316615902/0221f3e1-beae-4958-9589-26bc704654f7"&gt;
  &lt;inConfigs&gt;
    &lt;pair key ="org-root/boot-policy-localboot"&gt;
      &lt;lsbootPolicy name="localboot" descr="Modified by GaleForce Adapter" purpose="operational" dn="org-root/boot-policy-localboot" rebootOnUpdate="no" enforceVnicName="no"&gt;
        &lt;lsbootVirtualMedia rn="read-write-vm" order="1" access="read-write" /&gt;
        &lt;lsbootStorage order="2" rn="storage"&gt;
          &lt;lsbootLocalStorage rn="local-storage"/&gt;
       &lt;/lsbootStorage&gt;
     &lt;/lsbootPolicy&gt;
   &lt;/pair&gt;
&lt;/inConfigs&gt;
&lt;/configConfMos&gt;
 
Hope that helps.
 
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-09-21T16:08:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Invoke-XMLCommand in UCSPS</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4515436" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4515436</id>
    <updated>2011-09-20T17:12:14Z</updated>
    <published>2011-09-20T17:12:14Z</published>
    <summary type="html">Ravi,

The default templType gets set to initial-template, there currently is not a way to set it via the Add-VnicTemplate or Set-VnicTemplate. Building on Phillip's example you could do it like this

Invoke-XmlCommand -XMLStringList "&lt;configConfMo cookie='$($UCSM.Cookie)'&gt;&lt;inConfig&gt;&lt;vnicLanConnTempl name='jomcdono-eth0' dn=' org-root/lan-conn-templ-jomcdono-eth0' templType='updating-template' status='modified'/&gt;&lt;/inConfig&gt;&lt;/configConfMo&gt;"

In the example I'm changing the template jomcdono-eth0 to an updating-template.

Hope that helps

John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-09-20T17:12:14Z</dc:date>
  </entry>
  <entry>
    <title>RE: SCOPE Commands thru SSH &amp; VLAN changing thru CLI</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4309360" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4309360</id>
    <updated>2011-08-02T21:02:15Z</updated>
    <published>2011-08-02T21:01:53Z</published>
    <summary type="html">Hi 
 
1) I am trying to run the commands thru ssh from my secure server - on the given UCS Cluster ( CLI).
 
I am not able to run the commands under "scope ....."  
 
i can run - ssh myid@ucs-cluster show service-profile status  ,    but i can not run - ssh  myid@ucs-cluster scope org; scope service-profile .....
 
Is there any way out - i can run the commands thru ssh - even under the scope .
 
2)  i am looking for CLI based command to modify the vlan for a given blade .
 
Thanks
Vamsi


 
Vamsi,
 
Josh is correct about where to look for support on these types of questions.  I did however recently write  blog about automating the CLI,  check it out it may be of some help.
 
http://developer.cisco.com/web/unifiedcomputing/blogroll/-/blogs/automate-the-ucs-cli-with-expect
 
 
Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-08-02T21:01:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: Can the XML API retrieve the IP of the hypervisors or virtual machines?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4309343" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4309343</id>
    <updated>2011-08-02T20:55:35Z</updated>
    <published>2011-08-02T20:55:35Z</published>
    <summary type="html">[quote]Hi,
 
Can the XML API retrieve the IP of the hypervisors or virtual machines? I know we can get their MAC address but can we retrieve more attributes?
 
Thank you!
 
Regards.
 
Udo.[/quote]
 
Hi Udo,
 
UCS XML API is strickly concerned with the UCS components, both physical and logical, before the hypervisor boots.  Look the APIs or script libraries from the hypervisor vendors to see what they offer for VM information retrieval. For example PowerCLI from VM Ware.
 
Regards,
John</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-08-02T20:55:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: VLAN &amp; VSAN Template interfaces</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4269220" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4269220</id>
    <updated>2011-07-25T22:31:23Z</updated>
    <published>2011-07-25T22:31:23Z</published>
    <summary type="html">Thanks</summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-07-25T22:31:23Z</dc:date>
  </entry>
  <entry>
    <title>VLAN &amp; VSAN Template interfaces</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4269202" />
    <author>
      <name>John McDonough</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=4269202</id>
    <updated>2011-07-25T22:16:43Z</updated>
    <published>2011-07-25T22:16:43Z</published>
    <summary type="html">Is there a cmdlet to retrieve the interfaces associated with a Vnic or Vhba template.  Something comparable to Get-VnicInterface or Get-VhbaInterface, I used a configResolveChildren on my vXXX template dn with classId='vnicEtherIf' or classId='vnicFcIf' via Invoke-XmlCommand
 
I didn't see anything in the returned template object that indicated a list of associated interfaces. Would Get-VnicTemplateInterface, GetVhbaTemplateInterface be cmdlets that may be coming?
 
Regards,
John 
 </summary>
    <dc:creator>John McDonough</dc:creator>
    <dc:date>2011-07-25T22:16:43Z</dc:date>
  </entry>
</feed>

