Jump to: navigation, search

Difference between revisions of "ManagementAPI"

m (Text replace - "__NOTOC__" to "")
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
* '''Launchpad Entry''': [https://blueprints.launchpad.net/nova/+spec/management-api  Management API]
+
* '''Launchpad Entry''': [https://blueprints.launchpad.net/openstack-devops/+spec/management-api  Management API]
 
* '''Created''': 02 April 2012
 
* '''Created''': 02 April 2012
* '''Contributors''': Yehia Beyh, Lyle Wilkinson, Divakar Nandavar
+
* '''Contributors''': [https://launchpad.net/~yehia-beyh Yehia Beyh], [https://launchpad.net/~lyle-wilkinson Lyle Wilkinson], [https://launchpad.net/~divakar-padiyar-nandavar Divakar Nandavar]
 +
 
 +
__TOC__
  
 
== Summary ==
 
== Summary ==
  
Provide a general management api for cloud administration applications. The api would include features also provided by nova-manage CLIs. Currently Openstack administration requires access to command lines for performing management operations. This hinders application developers' ability to create Openstack applications.
+
Provide a general Nova management API for cloud administration applications. The API would include features also provided by nova-manage CLIs. Currently [[OpenStack]] administration requires access to command lines for performing management operations. This hinders application developers' ability to create [[OpenStack]] applications.  
 
 
The admin API proposal will compliment the proposed admin account actions [https://blueprints.launchpad.net/nova/+spec/admin-account-actions  admin account action], the following is the description of the proposal:
 
 
 
<pre><nowiki>
 
As a service provider, Rackspace needs to perform certain actions on a per-account basis. For example, an account needs to be suspended for violations of terms of service or non-payment. This specification is for a set of actions that can be performed on an account, which usually translates to actions performed on all the servers belonging to an account.
 
</nowiki></pre>
 
  
 +
The management API proposal will augment the proposed admin account actions interface ([https://blueprints.launchpad.net/nova/+spec/admin-account-actions  admin account action]).
  
 
== Release Note ==
 
== Release Note ==
Line 21: Line 18:
 
== Rationale ==
 
== Rationale ==
  
The lack of management API, administration is only performed with command lines. This hinders application developers' ability to improve the user experience in managing the openstack.  
+
The lack of management API, administration is only performed with command lines (CLIs). This hinders application developers' ability to improve the user experience in managing the [[OpenStack]].
 +
 
 +
There are some administrative APIs within Nova today.  However, these features are incomplete, not fully architected, and available only as extensions today.  While our initial approach would also be to leverage extensions, the goal for the Management API is to better organize and architect all management features.
  
 
== User stories ==
 
== User stories ==
  
* As a cloud Administrator, I want to be able to use a Management API to standup a Controller, Compute, Network and Images
+
* As a Cloud Administrator, I want to be able to use my own custom management toolset to standup a Controller, Compute, Network and Images.
* As a Network integrator, I want to support adding new or modify existing network range
+
* As a Network integrator, I want to support adding, modifying, or deleting network ranges.
* As a Nova security Administrator, I want to configure users, projects, tenants, roles, quotas from a UI  
+
* As a Cloud Security Administrator, I want to configure users, projects, tenants, roles, quotas from a UI.
  
 
== Assumptions ==
 
== Assumptions ==
Line 35: Line 34:
 
== Design ==
 
== Design ==
  
The Administration and management API provides
+
This feature provides REST APIs initially as Nova extensions. The API feature set includes POST, PUT, GET, and DELETE operations where applicable.
  
* REST APIs for programmatic access as an Nova extension API, the API includes POST/PUT/GET/DELETE operations.
+
=== Management Endpoint ===
  
=== Instance Type Management ===
+
Support a RESTful API, consistent with other [[OpenStack]] APIs, at a new endpoint specific to management operations.
Define or delete a new instance type
 
  
=== User/Role Management ===
+
=== Architected API ===
  
==== user ====
+
Rather than creating management APIs unique (unarchitected) for each [[OpenStack]] project, this proposal defines an API pattern general to all [[OpenStack]] projects.
add/remove/update/list
 
==== project ====
 
add/remove/update/list
 
==== role ====
 
add/remove/update/list
 
  
=== Service Management ===
+
=== Plug-ins and Extensions ===
  
service state
+
Future management operations would be easily added as plug-ins based on the pattern described here.
Service list
 
service describe
 
service disable
 
  
=== Network managment ===
+
=== Examples ===
  
network add/modify/delete/list
+
The following examples show how one can manage [[OpenStack]] components with the nova-manage CLI.  We propose supporting all this functionality via the Management API.
  
== Implementation ==
+
{| border="1" cellpadding="2" cellspacing="0"
 +
| | nova-manage CLI
 +
|  proposed management API
 +
|  proposed related API features
 +
|-
 +
|  nova-manage network list
 +
|  GET  .../Manage/Network?''name''=network_type&''Project''=name&''IPrange''=int&''Subnet''=int
 +
|  List all Networks with matching criteria
 +
|-
 +
|  nova-manage service list
 +
|  GET ...URI...
 +
|  PUT, ...
 +
|-
 +
|  nova-manage ''future options''
 +
|  GET ...URI...
 +
|  PUT, ...
 +
|}
 +
 
 +
For reference, here are several nova-manage CLI capabilities that should also be available via API.
  
'''Architecture'''
+
* Instance Type Management
 +
** Define or delete a new instance type
 +
* User/Role Management
 +
** user
 +
*** add/remove/update/list
 +
* project
 +
** add/remove/update/list
 +
* role
 +
** add/remove/update/list
 +
* Service Management
 +
** service state
 +
** service list
 +
** service describe
 +
** service disable
 +
* Network management
 +
** network add/modify/delete/list
 +
* Flavor management
 +
** Flavor enable/disable
  
attachment:TBD.gif
+
== Implementation ==
  
=== NOVA-MANAGE API Extensions ===
 
 
Implementation of Management APIs as Nova extensions would be based on the [[OpenStack]] defined API extension spec.  
 
Implementation of Management APIs as Nova extensions would be based on the [[OpenStack]] defined API extension spec.  
  
Line 96: Line 120:
 
|}
 
|}
  
Similarly other extensions to be designed.
+
Sample extension API for "Services" is as below:
 +
 
 +
{| border="1" cellpadding="2" cellspacing="0"
 +
|<#DDDDDD>|'''Verb'''
 +
|<#DDDDDD>|'''URI'''
 +
|-
 +
| GET
 +
|  /Manage/Service/detail?''name''=service_name&''Project''=name&''Hostname''=Host
 +
|-
 +
| PUT
 +
|  /Manage/Service/''service_name''?option=''Disable''
 +
|-
 +
| PUT
 +
|  /Manage/Service/''service_name''?option=''Enable''
 +
|}
 +
 
 +
Other options should follow the same pattern.
  
 
== Test/Demo Plan ==
 
== Test/Demo Plan ==
Line 109: Line 149:
  
 
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarizing what was discussed and note any options that were rejected.
 
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarizing what was discussed and note any options that were rejected.
 +
 +
http://etherpad.openstack.org/Management-API
  
 
  ----
 
  ----
 
[[Category:Spec]]
 
[[Category:Spec]]

Latest revision as of 23:30, 17 February 2013

Summary

Provide a general Nova management API for cloud administration applications. The API would include features also provided by nova-manage CLIs. Currently OpenStack administration requires access to command lines for performing management operations. This hinders application developers' ability to create OpenStack applications.

The management API proposal will augment the proposed admin account actions interface (admin account action).

Release Note

See API descriptions for additional details.

Rationale

The lack of management API, administration is only performed with command lines (CLIs). This hinders application developers' ability to improve the user experience in managing the OpenStack.

There are some administrative APIs within Nova today. However, these features are incomplete, not fully architected, and available only as extensions today. While our initial approach would also be to leverage extensions, the goal for the Management API is to better organize and architect all management features.

User stories

  • As a Cloud Administrator, I want to be able to use my own custom management toolset to standup a Controller, Compute, Network and Images.
  • As a Network integrator, I want to support adding, modifying, or deleting network ranges.
  • As a Cloud Security Administrator, I want to configure users, projects, tenants, roles, quotas from a UI.

Assumptions

TBD

Design

This feature provides REST APIs initially as Nova extensions. The API feature set includes POST, PUT, GET, and DELETE operations where applicable.

Management Endpoint

Support a RESTful API, consistent with other OpenStack APIs, at a new endpoint specific to management operations.

Architected API

Rather than creating management APIs unique (unarchitected) for each OpenStack project, this proposal defines an API pattern general to all OpenStack projects.

Plug-ins and Extensions

Future management operations would be easily added as plug-ins based on the pattern described here.

Examples

The following examples show how one can manage OpenStack components with the nova-manage CLI. We propose supporting all this functionality via the Management API.

nova-manage CLI proposed management API proposed related API features
nova-manage network list GET .../Manage/Network?name=network_type&Project=name&IPrange=int&Subnet=int List all Networks with matching criteria
nova-manage service list GET ...URI... PUT, ...
nova-manage future options GET ...URI... PUT, ...

For reference, here are several nova-manage CLI capabilities that should also be available via API.

  • Instance Type Management
    • Define or delete a new instance type
  • User/Role Management
    • user
      • add/remove/update/list
  • project
    • add/remove/update/list
  • role
    • add/remove/update/list
  • Service Management
    • service state
    • service list
    • service describe
    • service disable
  • Network management
    • network add/modify/delete/list
  • Flavor management
    • Flavor enable/disable

Implementation

Implementation of Management APIs as Nova extensions would be based on the OpenStack defined API extension spec.

Sample extension API for "Network" is as below:

Verb URI
GET /Manage/Network?name=network_type&Project=name&IPrange=int&Subnet=int
GET /Manage/Network/detail?name=network_type&Project=name&IPrange=int&Subnet=int
GET /Manage/Network/IPRange
DELETE /Manage/Network/id
POST /Manage/Network
PUT /Manage/Network/id

Sample extension API for "Services" is as below:

Verb URI
GET /Manage/Service/detail?name=service_name&Project=name&Hostname=Host
PUT /Manage/Service/service_name?option=Disable
PUT /Manage/Service/service_name?option=Enable

Other options should follow the same pattern.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarizing what was discussed and note any options that were rejected.

http://etherpad.openstack.org/Management-API

----