<?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>Odd truncation in UCS API?</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=8870360" />
  <subtitle>Odd truncation in UCS API?</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=8870360</id>
  <updated>2013-06-20T05:32:24Z</updated>
  <dc:date>2013-06-20T05:32:24Z</dc:date>
  <entry>
    <title>RE: Odd truncation in UCS API?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9114713" />
    <author>
      <name>Eric Williams</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9114713</id>
    <updated>2012-12-05T18:59:38Z</updated>
    <published>2012-12-05T18:59:38Z</published>
    <summary type="html"> 
Here you go.  First you need to login and get yoru cookie via the API with the curl commands below (which assumes HTTP communication):
$ cat aaa.sh 
#!/bin/bash
curl -H "Content-Type: text/xml" -N -s -d "&lt;aaaLogin inName="admin" inPassword="abc123" /&gt;" http://1.2.3.4/nuova
$ ./aaa.sh
 &lt;aaaLogin cookie="" response="yes" outCookie="1354316387/74eed11a-35d2-48a1-b569-f75c25ed1482" outRefreshPeriod="600" outPriv="admin,read-only" outDomains="org-root" outChannel="noencssl" outEvtChannel="noencssl" outSessionId="" outVersion="2.1(1a)"&gt; &lt;/aaaLogin&gt;
 
Then take the cookie and use it with the following script as illustrated below:
$ cat topsys.sh 
#!/bin/bash
COOKIE=$1
curl -H "Content-Type: text/xml" -N -s -d '&lt;configResolveClass cookie="$COOKIE" classId="topSystem" inHierarchical="true" /&gt;' http://1.2.3.4/nuova
 
$ ./topsys.sh "1354316387/74eed11a-35d2-48a1-b569-f75c25ed1482" &gt; topsys.out
As you can see the file I was returned was 1.9 MB:
$ ls -alh topsys.out 
-rw-r--r--  1 ericwill  staff   1.9M Dec  5 12:56 topsys.out
 
 </summary>
    <dc:creator>Eric Williams</dc:creator>
    <dc:date>2012-12-05T18:59:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Odd truncation in UCS API?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9114391" />
    <author>
      <name>Phillip Pollard</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9114391</id>
    <updated>2012-12-05T18:32:13Z</updated>
    <published>2012-12-05T18:32:13Z</published>
    <summary type="html">I suspected the same and dug all the way back to using LWP directly. I'd be really surprised with that being distrbuted with a truncation error, but you never know.

Do you have a sample of that curl to "grab all" that you talk about? That'll help me figure out of this bug is the module or not.
 </summary>
    <dc:creator>Phillip Pollard</dc:creator>
    <dc:date>2012-12-05T18:32:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Odd truncation in UCS API?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9096379" />
    <author>
      <name>Eric Williams</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=9096379</id>
    <updated>2012-12-05T04:48:45Z</updated>
    <published>2012-12-05T04:48:45Z</published>
    <summary type="html">Looks to be a bug with the Perl module you are using.  I have had responses of much larger XML responses than that doing direct calls w/ tools like curl.  Perform a configResolveClass w/ inHierarchical set to true on class "topSystem" on a UCS domain, and you will get the entire XML database returned.  It can be a few MB of data, and I have never had issues getting truncation before.  </summary>
    <dc:creator>Eric Williams</dc:creator>
    <dc:date>2012-12-05T04:48:45Z</dc:date>
  </entry>
  <entry>
    <title>Odd truncation in UCS API?</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8870359" />
    <author>
      <name>Phillip Pollard</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=8870359</id>
    <updated>2012-11-28T00:05:40Z</updated>
    <published>2012-11-28T00:05:40Z</published>
    <summary type="html">I am using the perl module Cisco::UCS to communicate with a UCS blade center version 2.0(2q).
I was running into trouble, and when I finally got down to debugging it I found that all the API responses I were receiving from the UCS were being truncated at 65536 characters/bytes.

It is a usual HTTPS transaction. The query returns as a valid HTTP response (200) and all other interactions are the same. There just seems to be a hard size limit on the XML response.
I've verified there are no network firewalls or such between me and the UCS.
When I run the same script on the current UCS emulator (version 2.0(3c)), I do not have this issue.
Has anyone seen this or do they have suggestions?</summary>
    <dc:creator>Phillip Pollard</dc:creator>
    <dc:date>2012-11-28T00:05:40Z</dc:date>
  </entry>
</feed>

