Jump to: navigation, search

Difference between revisions of "Blueprint-ipam-extensions-for-neutron"

(Network Policy and Security Groups)
(IPAM Resource)
 
(9 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
== <span>IPAM Resource </span>==
 
== <span>IPAM Resource </span>==
Network policy is mechanism by which a declarative way is provided to the clients to decided how Neutron virtual networks are connected and what traffic is allowed over those connections. Clients do not have to worry about how exactly the connectivity is achieved and how/where the rules are applied. This is to simplify deployments of multitier applications
 
 
    
 
    
 
{| class="wikitable"
 
{| class="wikitable"
Line 26: Line 25:
 
| ipam_dns_method||string||no||CRU||None||N/A||default, tenant or virtual dns server
 
| ipam_dns_method||string||no||CRU||None||N/A||default, tenant or virtual dns server
 
|-
 
|-
| ipam_dns_addr||string||no||CRU||None||N/A||dns server address or name
+
| ipam_dns_addr||list[string]||no||CRU||None||N/A||list of dns server address or name
 
|-
 
|-
| dhcp_options||list[string-string]||no||CRU||None||list or key-val pairs||list of dns key-value pairs
+
| dhcp_options||list[string-string]||no||CRU||None||list or key-val pairs||list of dhcp key-value pairs
 
|-
 
|-
 
| cidr_block||list[string]||no||CRU||None||list of cidrs||list of cidr blocks
 
| cidr_block||list[string]||no||CRU||None||list of cidrs||list of cidr blocks
 
|}
 
|}
  
==Network Policy Bind Points==
+
== CLI for IPAM==
In traditional networking gear ACL were always applied at various levels.
 
* Ports ACL(s)  à Security groups
 
* VLAN ACL(s) and Router ACL(s) à network policy
 
 
Network policy can be expressed in terms of network ID(s) rather than IP prefixes (CIDRs)
 
 
Information given in such a resource can be used to derive
 
*Connectivity between networks. i.e whether at a L3 network level routes need to be exchanged. e.g. allow traffic from web-network to db-network.
 
* Packet filters on traffic crossing two networks. e.g. allow only mysql traffic between web-network to db-network
 
 
 
== CLI for Network Policy==
 
 
<pre><nowiki>
 
<pre><nowiki>
policy-create                 Create a policy for a tenant.
+
ipam-create                   Create an IPAM for a given tenant.
policy-delete                 Delete a given policy.
+
ipam-delete                   Delete a given IPAM.
policy-list                   List policy(s) that belong to a given tenant.
+
ipam-list                     List IPAM information that belongs to a given tenant.
policy-show                   Show information of a given policy.
+
ipam-show                     Show information of a given IPAM.
policy-update                 Update a given policy.
+
ipam-update                   Update a given IPAM.
 
 
policy-rule-create                  Create a policy rule in a policy.
 
policy-rule-delete                  Delete a policy rule from a policy.
 
policy-rule-update                  Update policy rule in a policy.
 
policy-rule-show                    Show information of a policy rule.
 
 
</nowiki></pre>
 
</nowiki></pre>
  
 
== REST APIs==
 
== REST APIs==
=== Policy REST APIs===
+
=== IPAM REST APIs===
 
<pre><nowiki>
 
<pre><nowiki>
 
GET
 
GET
/v1.0/policies/
+
/v1.0/ipams/
 
GET
 
GET
/v1.0/policies/policy-id
+
/v1.0/ipams/ipam-id
 
POST
 
POST
/v1.0/policies
+
/v1.0/ipams
 
UPDATE
 
UPDATE
/v1.0/policies/policy-id
+
/v1.0/ipams/ipam-id
 
DELETE
 
DELETE
/v1.0/policies/policy-id
+
/v1.0/ipams/ipam-id
 
</nowiki></pre>
 
</nowiki></pre>
  
===PolicyCreate===
+
===IpamCreate===
 
====JSON Request====
 
====JSON Request====
 
<pre><nowiki>
 
<pre><nowiki>
 
{
 
{
   "policy": {
+
   "ipam": {
 
           "tenant_id": "310df60f-2a10-4ee5-9554-98393092194c",
 
           "tenant_id": "310df60f-2a10-4ee5-9554-98393092194c",
           "name": "test_policy",
+
           "name": "test_ipam",
 
           }
 
           }
 
}
 
}
Line 87: Line 70:
 
<pre><nowiki>
 
<pre><nowiki>
 
{
 
{
   "vpnservice": {
+
   "ipam": {
 
           "id": "02b1fef7-16f5-4917-bf19-c40a9af805ed",
 
           "id": "02b1fef7-16f5-4917-bf19-c40a9af805ed",
 
           "tenant-id": "310df60f-2a10-4ee5-9554-98393092194c",
 
           "tenant-id": "310df60f-2a10-4ee5-9554-98393092194c",
           "name": "test_policy",
+
           "name": "test_ipam",
          }
 
}
 
</nowiki></pre>
 
 
 
===Polcy Rules REST APIs===
 
<pre><nowiki>
 
GET
 
/v1.0/policy-rules/
 
GET
 
/v1.0/policy-rules/policy-rule-id
 
POST
 
/v1.0/policy-rules
 
UPDATE
 
/v1.0/policy-rules/policy-rule-id
 
DELETE
 
/v1.0/policy-rules/policy-rule-id
 
</nowiki></pre>
 
 
 
===PolicyRuleCreate===
 
====JSON Request====
 
<pre><nowiki>
 
{
 
  "policy_rule": {
 
          "policy_id": "04c77d28-f93d-4405-8b1a-d25b35e05037",
 
          "direction": "ingress",
 
          "protocol": "6",
 
          "src_addresses": ["1.1.1.0/24", "2.2.2.0/24"],
 
          "src_ports": ["10000-10100", "10500-10700"],
 
          "dst_addresses": ["1.1.1.0/24", "2.2.2.0/24"],
 
          "src_ports": ["80-80"],
 
          "action_list": ["simple_action-pass"],
 
          }
 
}
 
</nowiki></pre>
 
 
 
====JSON Response====
 
<pre><nowiki>
 
{
 
  "policy_rule": {
 
          "id": "f3dae1c4-e6f8-4165-ae1f-e20408b04fe2",
 
          "policy_id": "04c77d28-f93d-4405-8b1a-d25b35e05037",
 
          "direction": "ingress",
 
          "protocol": "6",
 
          "src_addresses": ["1.1.1.0/24", "2.2.2.0/24"],
 
          "src_ports": ["10000-10100", "10500-10700"],
 
          "dst_addresses": ["1.1.1.0/24", "2.2.2.0/24"],
 
          "src_ports": ["80-80"],
 
          "action_list": ["simple_action-pass"],
 
 
           }
 
           }
 
}
 
}
 
</nowiki></pre>
 
</nowiki></pre>
  
== Policy Workflow==
+
== IPAM Workflow==
* Policy create
+
* IPAM create with relevant DHCP, DNS and CIDR
* Policy rule add
+
* Neutron Network APIs to attach one or more IPAMS
* Neutron Network APIs to attach one or more policies in certain order.
 

Latest revision as of 17:50, 8 October 2013

IPAM Overview

Information common to a set of subnets on a network will be present in this resource. Following information will be stored in the resource:

  • Address allocation scheme (DHCP or unmanaged)
  • DNS server information
  • CIDR to be used by the network (in which all subnet definitions should belong)
  • List of DHCP option, value tuples

IPAM Resource

Attribute Type Required CRUD DefaultValue Validation Constraint Notes
id uuid-str N/A R generated N/A UUID for ipam object
tenant_id uuid-str Yes CR None valid tenant_id UUID of the tenant for ipam
name string no CRU None N/A name of the ipam resource
fq_name string no CRU None N/A fully qualified name of the ipam object
ipam_method string no CRU None N/A dhcp or fixed assignment
ipam_dns_method string no CRU None N/A default, tenant or virtual dns server
ipam_dns_addr list[string] no CRU None N/A list of dns server address or name
dhcp_options list[string-string] no CRU None list or key-val pairs list of dhcp key-value pairs
cidr_block list[string] no CRU None list of cidrs list of cidr blocks

CLI for IPAM

ipam-create                    Create an IPAM for a given tenant.
ipam-delete                    Delete a given IPAM.
ipam-list                      List IPAM information that belongs to a given tenant.
ipam-show                      Show information of a given IPAM.
ipam-update                    Update a given IPAM.

REST APIs

IPAM REST APIs

GET
/v1.0/ipams/
GET
/v1.0/ipams/ipam-id
POST
/v1.0/ipams
UPDATE
/v1.0/ipams/ipam-id
DELETE
/v1.0/ipams/ipam-id

IpamCreate

JSON Request

{
  "ipam": {
           "tenant_id": "310df60f-2a10-4ee5-9554-98393092194c",
           "name": "test_ipam",
           }
}

JSON Response

{
  "ipam": {
           "id": "02b1fef7-16f5-4917-bf19-c40a9af805ed",
           "tenant-id": "310df60f-2a10-4ee5-9554-98393092194c",
           "name": "test_ipam",
           }
}

IPAM Workflow

  • IPAM create with relevant DHCP, DNS and CIDR
  • Neutron Network APIs to attach one or more IPAMS