Search

23.3. Methods

download PDF

23.3.1. Creating a MAC Address Pool

Creation of a MAC address pool requires values for name and ranges.

Example 23.2. Creating a MAC address pool

POST /api/macpools HTTP/1.1
Accept: application/xml
Content-type: application/xml

<mac_pool>
    <name>MACPool</name>
    <description>A MAC address pool</description>
    <allow_duplicates>true</allow_duplicates>
    <default_pool>false</default_pool>
    <ranges>
        <range>
            <from>00:1A:4A:16:01:51</from>
            <to>00:1A:4A:16:01:e6</to>
        </range>
    </ranges>
</mac_pool>

23.3.2. Updating a MAC Address Pool

The name, description, allow_duplicates, and ranges elements are updatable post-creation.

Example 23.3. Updating a MAC address pool

PUT /api/macpools/ab39bbc1-1d64-4737-9b20-ce081f99b0e1 HTTP/1.1
Accept: application/xml
Content-type: application/xml

<mac_pool>
    <name>UpdatedMACPool</name>
    <description>An updated MAC address pool</description>
    <allow_duplicates>false</allow_duplicates>
    <ranges>
        <range>
            <from>00:1A:4A:16:01:51</from>
            <to>00:1A:4A:16:01:e6</to>
        </range>
        <range>
            <from>02:1A:4A:01:00:00</from>
            <to>02:1A:4A:FF:FF:FF</to>
        </range>
    </ranges>
</mac_pool>

23.3.3. Removing a MAC Address Pool

Removal of a MAC address pool requires a DELETE request.

Example 23.4. Removing a MAC address pool

DELETE /api/macpools/ab39bbc1-1d64-4737-9b20-ce081f99b0e1 HTTP/1.1

HTTP/1.1 204 No Content
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.