<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[OSIRIS JSON]]></title><description><![CDATA[The Open Specification for Infrastructure Resource Interchange Schema designed to allow you to take snapshots of your infrastructure at a point in time.]]></description><link>https://osirisjson.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6a69d235c9ffd6010cd393b5/55ea72ac-9611-4f36-bb8a-fcd6e78fd503.png</url><title>OSIRIS JSON</title><link>https://osirisjson.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 04:38:53 GMT</lastBuildDate><atom:link href="https://osirisjson.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building an Aruba Central Producer in Go: Four API edge cases we had to solve]]></title><description><![CDATA[A deterministic infrastructure collector sounds straightforward: authenticate, call the API, normalize the response, and write JSON. Enterprise APIs…]]></description><link>https://osirisjson.hashnode.dev/building-an-aruba-central-producer-in-go-four-api-edge-cases-we-had-to-solve</link><guid isPermaLink="true">https://osirisjson.hashnode.dev/building-an-aruba-central-producer-in-go-four-api-edge-cases-we-had-to-solve</guid><category><![CDATA[networking]]></category><category><![CDATA[command line]]></category><category><![CDATA[aruba-central]]></category><category><![CDATA[mcp]]></category><category><![CDATA[aitools]]></category><category><![CDATA[architecture]]></category><category><![CDATA[Open Source]]></category><dc:creator><![CDATA[Tia Zanella]]></dc:creator><pubDate>Wed, 29 Jul 2026 10:22:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a69d235c9ffd6010cd393b5/48fc44eb-65c2-4367-8a21-a76142cbf18b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A deterministic infrastructure collector sounds straightforward: authenticate, call the API, normalize the response, and write JSON.</p>
<p>Enterprise APIs quickly make that model more complicated.</p>
<p>While building the <a href="https://docs.osirisjson.org/osiris-producers/network/hpe-aruba-networking-central/">v0.1.0 OSIRIS JSON Producer for HPE Aruba Networking Central</a>, we had to account for different pagination models, inconsistent response envelopes, stack-specific query behavior, more than one authentication flow and probably found a bug in the Aruba Central API access point endpoint for which <a href="https://airheads.hpe.com/discussion/new-central-api-get-a-list-of-access-points">a discussion was opened</a>.</p>
<p>The goal was not merely to export inventory. <a href="https://osirisjson.org/en/commitments/manifesto">OSIRIS JSON intention</a> is to translate Aruba Central data into a deterministic, <a href="https://osirisjson.org/en/specification">vendor-neutral OSIRIS JSON document</a> without silently dropping resources or losing the relationships that make the topology and the documentation useful.</p>
<p>Here are four implementation challenges that shaped the producer.</p>
<h2>1. Pagination is an endpoint-level concern</h2>
<p>A reusable API client often begins with the assumption that one pagination strategy will work across the service. That was not the case here.</p>
<p>Many Aruba Central endpoints accept limit-and-offset pagination and can return up to <code>1000</code> items per request. Other endpoints behave differently. For example, <code>/gateways/{serial}/vlans</code> uses cursor pagination, some enforces lower maximum page size, and returns a <code>400</code> response when a larger limit is requested.</p>
<p>Treating pagination as a client-wide behavior would have created a dangerous failure mode: the <a href="https://docs.osirisjson.org/osiris-producers/getting-started/">OSIRIS JSON producer</a> could appear to succeed while returning an incomplete infrastructure snapshot.</p>
<p>The OSIRIS JSON producer therefore selects the pagination strategy according to the resource being collected. The important design principle was simple:</p>
<blockquote>
<p>Pagination must be explicit, testable, and impossible to ignore.</p>
</blockquote>
<p>For infrastructure discovery, partial success can be worse than a visible failure because downstream users may assume that the resulting topology is complete.</p>
<h2>2. LLDP/CDP data needs tolerant parsing and strict identity rules</h2>
<p>A topology becomes useful when it explains relationships, not only objects.</p>
<p>The Aruba Central <code>/neighbours</code> endpoint provides the LLDP/CDP adjacencies needed to connect switches, access points, gateways, and external devices. Its response shape, however, differs from the common <code>{"items": [...]}</code> envelope used by other endpoints. Depending on the response, the payload may arrive as a bare array or a flatter object.</p>
<p>We implemented a tolerant parser that accepts the observed shapes while still validating the data required to create an adjacency.</p>
<p>The endpoint also mixes entries such as <code>Client</code> and <code>Stack</code> records into the neighbor data. Those entities are already modeled elsewhere, so accepting every row would create duplicates and ambiguous relationships.</p>
<p>The producer filters those duplicate classes but deliberately preserves <code>Unmanaged</code> neighbors.</p>
<p>Aruba Central represents some of those external devices with synthetic serials in the form <code>tpd_&lt;hex&gt;</code>. By deriving the MAC address from that value, the producer can create an OSIRIS JSON stub resource for a third-party device found at the boundary of the managed Aruba domain.</p>
<p>That stub is valuable even when little else is known about the device. It records that the relationship exists and creates an identity that another producer may later enrich.</p>
<h2>3. Switch stacks must be queried through the conductor</h2>
<p>Switch stacks introduced a different class of problem.</p>
<p>When hardware details or interfaces are requested from a non-conductor member, Aruba Central can return <code>404</code>. The conductor is the valid query target, and its response can include data for every physical member of the stack.</p>
<p>The collection flow therefore had to change from a device-by-device pattern to a stack-aware pattern:</p>
<ol>
<li><p>identify the conductor;</p>
</li>
<li><p>query the stack through that device;</p>
</li>
<li><p>receive the combined response once; and</p>
</li>
<li><p>route each interface back to the correct in-memory switch by serial number.</p>
</li>
</ol>
<p>This avoided redundant calls and prevented the interfaces of individual members from being assigned to the stack as a single undifferentiated object.</p>
<p>The broader lesson is that API resources do not always map one-to-one to real infrastructure resources. A collector has to understand the operational model behind the endpoint.</p>
<h2>4. Authentication must support enterprise and self-service workflows</h2>
<p>The producer supports standard OAuth 2.0 API Gateway credentials as well as HPE GreenLake Personal API clients.</p>
<p>For the GreenLake flow, the producer requests access tokens with <code>grant_type=client_credentials</code> against the GreenLake SSO endpoint. It also handles token renewal after a <code>401</code> response so that longer collection runs do not fail simply because a token expired.</p>
<p>Supporting both methods matters for adoption.</p>
<p>An enterprise team may provision a centrally governed application credential for scheduled CI/CD execution. An individual engineer evaluating the producer may need a lower-friction way to run it against an authorized test environment. The collection logic should remain identical regardless of how the token was obtained.</p>
<h2>The resulting architecture</h2>
<p>The result is a concurrent, read-only Go producer that converts Aruba Central resources and relationships into a deterministic OSIRIS JSON snapshot.</p>
<p>The producer currently models:</p>
<ul>
<li><p>switches, access points, gateways, and wired and wireless clients;</p>
</li>
<li><p>switch stacks, VSX peers, LAGs, VLANs, and IAP mesh swarms;</p>
</li>
<li><p>LLDP/CDP adjacencies, including stubs for unmanaged boundary devices;</p>
</li>
<li><p>configuration-health and site-health context; and</p>
</li>
<li><p>both concise <code>documentation</code> and deeper <code>audit</code> outputs.</p>
</li>
</ul>
<p>The generated document remains local unless the operator chooses to send it elsewhere. It can be versioned, diffed, transformed into diagrams, integrated with CMDB/IPAM/DCIM workflows, or used as governed context for internal automation and AI platform/agents and MCP servers use-cases.</p>
<p>Download and try it: <a href="https://docs.osirisjson.org/osiris-producers/network/hpe-aruba-networking-central/">OSIRIS JSON Producer for HPE Aruba Networking Central</a></p>
<p>Feedback is especially welcome on identity reconciliation, VSX and stack modeling, unmanaged-neighbor handling, and other Aruba Central API edge cases encountered in production environments.</p>
]]></content:encoded></item></channel></rss>