Jump to: navigation, search

Difference between revisions of "Designate/Blueprints/ReverseFixedIP"

(Set the PTR Record for a Fixed IP (Patch))
(List the Fixed IP PTR Records (GET))
 
(44 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
=== Summary ===
 
=== Summary ===
  
Provide a simple interface towards an entities PTR records based on allocated Fixed IPs.
+
This blueprint proposes to provide an interface for a VM instance's PTR record based on the allocated Fixed IP.
  
== API Changes ==
+
This blueprint is based on the blueprint for floating IP PTR records:
 +
 
 +
    [[Designate/Blueprints/Reverse]]
 +
 
 +
== API Resource - Private / Fixed IPs ==
  
 
Using the general endpoint call "/reverse" add the fixed IP resource called "fixedips".
 
Using the general endpoint call "/reverse" add the fixed IP resource called "fixedips".
  
=== One Per Change ===
+
=== API Details ===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Verb !! Resource !! Description
 
! Verb !! Resource !! Description
 
|-
 
|-
| GET || /reverse/fixedips/{instance ID} || Return the PTR record for the given instance ID.
+
| GET || /reverse/fixedips || Return the list of PTR records for all fixed IP addresses.
 
|-
 
|-
| PATCH || /reverse/fixedips/{instance ID} || Set or unset the PTR record for the given instance ID.
+
| GET || /reverse/fixedips/{region}:{IP address} || Return the PTR record for the given fixed IP address.
 +
|-
 +
| PATCH || /reverse/fixedips/{region}:{IP address} || Create or delete the PTR record for the given fixed IP address.
 
|}
 
|}
  
==== Get PTR Record (GET) ====
+
==== List the Fixed IP PTR Records (GET) ====
 +
 
 +
Return the list of PTR record for all fixed IP addresses.
 +
 
 +
There is no request message body.
 +
 
 +
'''Response'''
 +
    {
 +
        “fixedips”: [
 +
            {
 +
                "ptrdname": "server.mydomain.com.",
 +
                "address": "<region>:<ipv4 or ipv6 compliant address>",
 +
                "ttl": 3600,
 +
                "description": null,
 +
                "links": {
 +
                    "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
 +
                }
 +
            },
 +
            {
 +
                "ptrdname": "server2.mydomain.com.",
 +
                "address": "<region>:<ipv4 or ipv6 compliant address>",
 +
                "ttl": 3600,
 +
                "description": null,
 +
                "links": {
 +
                    "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
 +
                }
 +
            }
 +
        ],
 +
        "links": {
 +
            "self": "http://endpoint/v2/reverse/fixedips"
 +
        }
 +
    }
 +
 
 +
==== Get the Fixed IP PTR Record (GET) ====
 +
 
 +
Return the PTR record for the given fixed IP address.
  
Return the PTR record for the given instance ID.
 
 
There is no request message body.
 
There is no request message body.
  
Line 34: Line 74:
 
     {
 
     {
 
         “fixedip”: {
 
         “fixedip”: {
            "id": "<uuid>",
+
             "ptrdname": "server.mydomain.com.",
             "ptrdname": "server1.mydomain.com.",
+
             "address": "<region>:<ipv4 or ipv6 compliant address>",
             "address": "<insert ipv4 or ipv6 compliant address here",
 
 
             "ttl": 3600,
 
             "ttl": 3600,
            "created_at": "2014-03-04T11:00:01.000000",
 
            "update_at": null,
 
 
             "description": null,
 
             "description": null,
 
             "links": {
 
             "links": {
                 "self": "http://endpoint/v2/reverse/fixedips/<instance_id>"
+
                 "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
 
             }
 
             }
 
         }
 
         }
 
     }
 
     }
  
==== Set the PTR Record for a Fixed IP (Patch) ====
+
==== Create the Fixed IP PTR Record (PATCH) ====
  
Set the PTR record for the given instance ID.
+
Create the PTR record for the given fixed IP address.
  
 
'''Request'''
 
'''Request'''
Line 62: Line 99:
 
     {
 
     {
 
         “fixedip”: {
 
         “fixedip”: {
            "id": "<uuid>",
 
 
             "ptrdname": "server.mydomain.com.",
 
             "ptrdname": "server.mydomain.com.",
             "address": "<insert ipv4 or ipv6 compliant address here",
+
             "address": "<region>:<ipv4 or ipv6 compliant address>",
 
             "ttl": 3600,
 
             "ttl": 3600,
            "created_at": "2014-03-04T11:00:01.000000",
 
            "update_at": null,
 
 
             "description": null,
 
             "description": null,
 
             "links": {
 
             "links": {
                 "self": "http://endpoint/v2/reverse/fixedips/<instance_id>"
+
                 "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
 
             }
 
             }
 
         }
 
         }
 
     }
 
     }
  
== Database Changes ==
+
==== Delete the Fixed IP PTR Record (PATCH) ====
Description of Changes to DB schemas
+
 
 +
Delete the PTR record for the given fixed IP address.
 +
 
 +
'''Request'''
 +
    {
 +
        "fixedip": {
 +
            "ptrdname": null
 +
        }
 +
    }
  
eg -
+
The return body is empty.
  
{| class="wikitable"
+
== Database Changes ==
|-
+
There are no changes to the database schema.
! Name!! Data Type !! Length !! Nullable!! Details
 
|-
 
| id || VARCHAR || 36 || False || Primary Key, Generated UUID
 
|-
 
| name || VARCHAR || 255 || False || Domain name to be blacklisted
 
|-
 
| version || INTEGER || - || False || Designate API version
 
|-
 
| created_at || DATETIME ||  -  || False || UTC time of creation
 
|-
 
| updated_at || DATETIME || - ||True || UTC time of creation
 
|-
 
| description || VARCHAR || 160 || True || UTF-8 text field
 
|}
 

Latest revision as of 15:28, 13 March 2014

Overview

Gerrit Patch []
Launchpad Blueprint [1]

Summary

This blueprint proposes to provide an interface for a VM instance's PTR record based on the allocated Fixed IP.

This blueprint is based on the blueprint for floating IP PTR records:

   Designate/Blueprints/Reverse

API Resource - Private / Fixed IPs

Using the general endpoint call "/reverse" add the fixed IP resource called "fixedips".

API Details

Verb Resource Description
GET /reverse/fixedips Return the list of PTR records for all fixed IP addresses.
GET /reverse/fixedips/{region}:{IP address} Return the PTR record for the given fixed IP address.
PATCH /reverse/fixedips/{region}:{IP address} Create or delete the PTR record for the given fixed IP address.

List the Fixed IP PTR Records (GET)

Return the list of PTR record for all fixed IP addresses.

There is no request message body.

Response

   {
       “fixedips”: [
           {
               "ptrdname": "server.mydomain.com.",
               "address": "<region>:<ipv4 or ipv6 compliant address>",
               "ttl": 3600,
               "description": null,
               "links": {
                   "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
               }
           },
           {
               "ptrdname": "server2.mydomain.com.",
               "address": "<region>:<ipv4 or ipv6 compliant address>",
               "ttl": 3600,
               "description": null,
               "links": {
                   "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
               }
           }
       ],
       "links": {
           "self": "http://endpoint/v2/reverse/fixedips"
       }
   }

Get the Fixed IP PTR Record (GET)

Return the PTR record for the given fixed IP address.

There is no request message body.

Response

   {
       “fixedip”: {
           "ptrdname": "server.mydomain.com.",
           "address": "<region>:<ipv4 or ipv6 compliant address>",
           "ttl": 3600,
           "description": null,
           "links": {
               "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
           }
       }
   }

Create the Fixed IP PTR Record (PATCH)

Create the PTR record for the given fixed IP address.

Request

   {
       "fixedip": {
           "ptrdname": "server.mydomain.com.",
           "ttl": 3600
       }
   }

Response

   {
       “fixedip”: {
           "ptrdname": "server.mydomain.com.",
           "address": "<region>:<ipv4 or ipv6 compliant address>",
           "ttl": 3600,
           "description": null,
           "links": {
               "self": "http://endpoint/v2/reverse/fixedips/<region>:<ipv4 or ipv6 compliant address>"
           }
       }
   }

Delete the Fixed IP PTR Record (PATCH)

Delete the PTR record for the given fixed IP address.

Request

   {
       "fixedip": {
           "ptrdname": null
       }
   }

The return body is empty.

Database Changes

There are no changes to the database schema.