Jump to: navigation, search

Difference between revisions of "Trove/trove-versions-types"

(API)
(API)
Line 129: Line 129:
 
GET        /instances/{instanceId}        Add the type and version to the instance details returned
 
GET        /instances/{instanceId}        Add the type and version to the instance details returned
  
'''Response Codes:''' same as current call
+
'''Response Codes:''' same as current call <br/>
'''Error Codes:''' same as current call
+
'''Error Codes:''' same as current call<br/>
'''Description:''' Return the database type and version currently in use on the instance
+
'''Description:''' Return the database type and version currently in use on the instance<br/>
'''Request Body:''' This operation does not require a request body.
+
'''Request Body:''' This operation does not require a request body.<br/>
'''Response:'''
+
'''Response:'''<br/>
 
+
<pre>
 
{
 
{
 
     "instance": {
 
     "instance": {
Line 169: Line 169:
 
     }
 
     }
 
}
 
}
 +
</pre>
  
 
=== List Instances (Existing) ===
 
=== List Instances (Existing) ===

Revision as of 05:15, 20 February 2013

Versions and DB Types

List Supported Types and Versions (New Call)

Use Case / User Story

As a Reddwarf User, I want the ability to list all support database types and major versions, so that I know which types and versions are available to be provisioned.

GET /types List supported instance types

STATUS FIELDS
DEFAULT - This is the default database type. If you do not specify a type when creating an instance, this is the default database type.
SUPPORTED - This is a supported database type.
UNSUPPORTED - This is an unsupported but available database type.
DEPRECATED - Deprecated instance types are no longer provisionable but are still supported. You will not be able to create instances of this type.

API

Response Codes: 200
Error Codes: STD_ERR_CODES
Description: Returns the support instance types (major versions). Example, MySQL 5.1, MySQL 5.5, Percona 5.5, MariaDB 5.5, etc.
Request Body: This operation does not require a request body.
Response:

{
    "types": [
        {
            "id": 1, 
            "links": [
                {
                    "href": "https://service/v1.0/1234/types/2", 
                    "rel": "self"
                }, 
                {
                    "href": "https://service/types/2", 
                    "rel": "bookmark"
                }
            ], 
            '''"name": "MySQL 5.1",
            "versions": [
                {
                    "version":"5.1.63",
                    "description":"Imperitive security updates included in this version.  Reccommend that you update"
                }
            ],
            "status": "DEPRECATED", 
            "updated": "2012-01-01T00:00:00Z"
            "description":"Some description."
        },'''
        {
             "id": 2, 
            "links": [
                {
                    "href": "https://service/v1.0/1234/types/2", 
                    "rel": "self"
                }, 
                {
                   "href": "https://service/types/2", 
                    "rel": "bookmark"
                }
            ],
            "name": "MySQL 5.5",
            "versions": [
                {
                    "version":"5.5.22",
                    "description":"Some description that is optional"
                }
            ],
            "status": "SUPPORTED", 
            "updated": "2012-01-01T00:00:00Z"
            "description":"Some description."
        },
        {
             "id": 3, 
            "links": [
                {
                    "href": "https://service/v1.0/1234/types/3", 
                    "rel": "self"
                }, 
                {
                   "href": "https://service/types/3", 
                    "rel": "bookmark"
                }
            ],
            "name": "MySQL 5.6",
            "versions": [
                {
                    "version":"5.6.30",
                    "description":"Imperitive security updates included in this version.  Reccommend that you update"
                }
            ],
            "status": "DEFAULT", 
            "updated": "2012-01-01T00:00:00Z"
            "description":"Some description."
        },
        {
             "id": 4, 
            "links": [
                {
                    "href": "https://service/v1.0/1234/types/4", 
                    "rel": "self"
                }, 
                {
                    "href": "https://service/types/4",
                    "rel": "bookmark"
                }
            ],
            "name": "MariaDB 5.5",
            "versions": [
                {
                    "version":"5.5.36",
                    "description":"Maria updates!"
                }
            ],
            "status": "UNSUPPORTED", 
            "updated": "2012-01-01T00:00:00Z"
            "description":"Some description."
        }
    ]
}

List Database Instance Status and Details (Existing)

Use Cases / User Stories

As a Reddwarf user, I want to know what the current version and type of database (MySQL in the current case) that is associated with my instance so that I can better understand version-based limitations/vulnerabilities and determine if I would benefit from an upgrade (when upgrades and multiple versions become available).

Note: This is a modification to the "List Database Instance Status and Details" call

API

GET /instances/{instanceId} Add the type and version to the instance details returned

Response Codes: same as current call
Error Codes: same as current call
Description: Return the database type and version currently in use on the instance
Request Body: This operation does not require a request body.
Response:

{
    "instance": {
        "created": "2012-03-28T21:31:02Z", 
        "flavor": {
           ...
        }, 
        "hostname": "192.168.1.1", 
        "id": "2450c73f-7805-4afe-a42c-4094ab42666b", 
        "links": [
           ...
        ], 
        "name": "my_db_inst",  
        "status": "ACTIVE", 
        "updated": "2012-03-28T21:34:25Z", 
        "volume": {
            "size": 2, 
            "used": 0.124542236328125
        },
        "type": {
            "id": "1",
            "links": [
                {
                    "href": "https://service/v1.0/1234/type/1", 
                    "rel": "self"
                }, 
                {
                   "href": "https://service/type/1", 
                    "rel": "bookmark"
                }
            ]
        },
        "version": "5.1.61"
    }
}

List Instances (Existing)

Use Case / User Story

As a Reddwarf user, I want to view the type of database (i.e. MySQL 5.1 / major version) that is associated with each instance listed on my account so that I can quickly assess any differentiations between instances and determine which instances, if any, may need to be updated.

API

GET /instances Lists the status and information for all database instances.

Response Codes: same as current call
Error Codes: same as current call
Description: Return the database type and version currently in use on the instance
Request Body: This operation does not require a request body.
Response:

{

   "instances": [
       {
           "flavor": {
               ...
           }, 
           "id": "28d1b8f3-172a-4f6d-983d-36021508444a", 
           "links": [
              ...
           ], 
           "name": "my_db_inst", 
           "status": "ACTIVE", 
           "volume": {
               "size": 2
           }
           "type": {
           "id": "1",
           "links": [
               {
                   "href": "https://service/v1.0/1234/type/1", 
                   "rel": "self"
               }, 
               {
                   "href": "https://service/type/1", 
                   "rel": "bookmark"
               }
           ]
           }
       }, 
       {
           "flavor": {
               ...
           }, 
           "id": "8fb081af-f237-44f5-80cc-b46be1840ca9", 
           "links": [
               ...
           ], 
           "name": "my_db_inst_2", 
           "status": "ACTIVE", 
           "volume": {
               "size": 2
           }
           "type": {
           "id": "2",
           "links": [
               {
                   "href": "https://service/v1.0/1234/type/2", 
                   "rel": "self"
               }, 
               {
                   "href": "https://service/type/2", 
    
              "rel": "bookmark"
               }
           ]
           }
       }
   ]

}

Create Database Instance (Existing)

Use Case / User Story

As a Reddwarf User, I want the ability to specify the database type (major version) when creating an instance, so that I can create different database instances based on my application needs.

API

POST /instances Creates a new database instance.

New Attributes: type, optional - default will be what has STATUS - DEFAULT
Response Codes: same as current call
Error Codes: same as current call
Description:
Request Body:
{

   "instance": {
       "databases": [
           {
               "character_set": "utf8", 
               "collate": "utf8_general_ci", 
               "name": "sampledb"
           }, 
           {
               "name": "nextround"
           }
       ], 
       "flavorRef": ""href": "https://service/v1.0/1234/flavors/1", 
       "name": "my_db_inst", 
       "users": [
           {
               "databases": [
                   {
                       "name": "sampledb"
                   }
               ], 
               "name": "demouser", 
               "password": "demopassword"
           }
       ], 
       "volume": {
           "size": 2
       }
       "typeRef": ""href": "https://service/v1.0/1234/type/1",
   }

}

Response: {

   "instance": {
       "created": "2012-01-25T21:53:09Z", 
       "flavor": {
           "id": "1", 
           "links": [
              ...
           ]
       }, 
       "hostname": "192.168.1.1", 
       "id": "dea5a2f7-3ec7-4496-adab-0abb5a42d635", 
       "links": [
          ...
       ], 
       "name": "my_db_inst", 
       "status": "BUILD", 
       "updated": "2012-01-25T21:53:10Z", 
       "volume": {
           "size": 2
       }
      "type": {
           "id": "1",
           "name": "MySQL 5.1",
           "links": [
               {
                   "href": "https://service/v1.0/1234/type/1", 
                   "rel": "self"
               }, 
               {
                   "href": "https://service/type/1", 
                   "rel": "bookmark"
               }
           ]
       }
   }

}