Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cisco ACI Cookbook

You're reading from   Cisco ACI Cookbook A Practical Guide to Maximize Automated Solutions and Policy-Drive Application Profiles

Arrow left icon
Product type Paperback
Published in May 2017
Publisher
ISBN-13 9781787129214
Length 424 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Stuart Fordham Stuart Fordham
Author Profile Icon Stuart Fordham
Stuart Fordham
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Understanding Components and the ACI Fabric FREE CHAPTER 2. Configuring Policies and Tenants 3. Hypervisor Integration (and Other Third Parties) 4. Routing in ACI 5. ACI Security 6. Implementing Quality of Service in ACI 7. Network Programmability with ACI 8. Monitoring ACI 9. Troubleshooting ACI 10. An End-to-End Example Using the NX-OS CLI

Creating a tenant using REST and XML


When we created the TenantA tenant, way back in Chapter 2, Configuring Policies and Tenants, it was very straightforward. We named the new tenant, pressed Submit, and the tenant was created. Creating a tenant using the REST client is no harder.

How to do it...

  1. From Postman, set the URL to https://192.168.1.205/api/mo/uni.xml.
  2. On line one, enter the following:
     <fvTenant name="TenantA"/>
  1. Press Send.

How it works...

You may need to reauthenticate if you get a status of 403 Forbidden and the following returned:

<?xml version="1.0" encoding="UTF-8"?>
<imdata totalCount="1">
 <error code="403" text="Token was invalid (Error: Token timeout)"/>
</imdata>

If this is the case, then you can repeat commands from the list on the left-hand side.

If all worked well, in the result, you should get a status of 200 OK and the following code:

<?xml version="1.0" encoding="UTF-8"?>
<imdata totalCount="0"></imdata>

Here is the tenant...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime