Cisco Customer Success - Video

Accelerating Intersight Automation

Playback confirmation!

Do you want to resume playing from last left location?

Chapter 1 Thumbnail
00:07
Introduction and agenda
Chapter 2 Thumbnail
00:41
Creating a scrub policy in Intersight UI
Chapter 3 Thumbnail
01:29
Using browser developer tools to capture API POST
Chapter 4 Thumbnail
02:59
Copy as cURL and generate Ansible playbook with Copilot
Chapter 5 Thumbnail
04:23
Running the playbook and verifying automation

Transcript

Welcome to from Clicks to Code Speeding Up Intersight automation. In this current session, we will cover the following topics. Speeding up Intersight automation with tools you rely on daily along with a demo on.00:07Accelerating development.00:20Intersight's API is powerful, though extensive, featuring hundreds of endpoints across compute, network, and storage domains. Traditional automation development entails navigating API documentation, grasping the inner relationships among objects and constructing correct payloads. There is a faster method that uses the tool.00:21Tools you already rely on daily, which will demonstrate in the following demo. In this demo, we'll manually create a simple scrub policy in inter site and then capture the API request so that we can reuse it to generate code in Ansible, terraform.00:41PowerShell and other tools. Within Intersight, we'll go to policies and then we'll select create policy. We'll go ahead and choose the scrub policy. We'll keep the organization default, and we'll just provide a name.00:55And underneath policy details, we will now simply choose to scrub the BIOS.01:24But before we go ahead and click on create, let's go ahead and open up the browser developer tools now. This method may vary by browser, but for Chrome it would be the three dots in the top right of the browser, indeed. And then we'd go to more tools and developer tools.01:29And you'll notice here that we're currently positioned in the network tab. What we'll do is apply a filter for the post method, which will scrub out noise since we're only looking at post requests for that particular activity on this screen to keep things focused.01:45We can also add an additional filter for APIV one, which will remove the unnecessary extraneeous post requests that the browser maybe sending to other applications. Now that we've got the filter set up, let's go ahead and click create.02:02From this we can observe that the scrub policy has now been created, and in our browser window, we can see a post request to the scrub policy's API endpoint. Therefore, we will proceed to review it here at this moment. And beneath the headers, the request URL was directed to API.02:21PIV one compute scrub policies, and the request method was post.02:38If you click on the payload tab, you can see the JSON payload that was sent along with the request. Please take note that it contains our policy name, its comprehensive description, the bio scrub target, and a reference to our default organization by EMO for your records.02:43Moyds are the unique identifiers for objects within inter site now. So let's proceed by right clicking our scrub policy and selecting copy as curl, please. So this is gonna provide a curl command to replay this request, which we'll use later in our next step.02:59Next, we'll open VS Code with GitHub copilot. You can use any similar tools such as cursor or windserve today. I've already configured environment variables for the Intersight API key ID and private key to enable Ansible authentication with Intersight.03:17As part of our workflow, then we'll create a new demo YAML file and ask copilot to generate an ansible playbook using the curl command we extracted from our UI steps. So here in our prompt, within the chat window, we are providing some basic instructions to the LLM that.03:34The environment variables are already set for authentication.03:54And to behave in a certain way when generating the playbook from my curl command. As you'll also notice I have stripped out the headers from the curl command before sending it to the LLM since the headers contains sensitive authentication information. So as you can see below, the LLM has gone ahead and provided us with a complete play.03:58Playbook. Okay, we will proceed to copy that over here and then save it.04:17This will allow us to clearly verify that it is pulling in our default organization, the one that is currently set to default as designed. In the prompt itself, we did indicate that we are operating under the default organization. Now we are checking to determine whether the scrub policy already exists. So we.04:23We are issuing a request to this compute scrub policy's endpoint and searching for the policy name as a record.04:43And then here we're in the process of creating a scrub policy as part of this configuration workflow. So again, we're using the same API endpoint, but here we're passing the organization Emowood, the name, the description, and the scrub targets. That information is what's available in our curl command shown here.04:50And we'll only perform this if the scrub policy does not already exist. So let's go ahead and run this playbook now. We can see it skipped creating the scrub policy, so we will go back to Intersight here.05:08And we'll search for our scrub policy and we'll go ahead and delete that right now. And if we go back to VS code and we run our playbook again, since the policy NO longer exists, it should go ahead and recreate that as part of this process. So we can see right here.05:27Looks like it did recreate it for clarity. And if we go back to Intersight as we did earlier, Refresh that. So we now see our scrub policy automated with Ansible in under 5 min. That indeed now concludes our demo. We hope you found the.05:47That's useful in speeding up your inter site automation journey.06:07

About this Video

Author : Cisco Customer Success

Uploaded : September 02, 2026

Data CenterIntersight
AI summary icon

AI summary

Explore Cisco Intersight automation from clicks to code. The recording shows creating a Scrub Policy, capturing the POST request with browser Developer Tools, filtering on POST and API version one, copying as curl, and turning it into an Ansible playbook in VS Code, then extending to Terraform and PowerShell.

  • Capture UI actions and reuse the exact API payload.
  • Generate an Ansible playbook from curl in VS Code.
  • Extend automation to Terraform and PowerShell.