In a configuration that includes OpenStack, XOS indirectly calls VTN via Neutron. In this case, Neutron's ML2 plugin informs OpenStack Nova about the virtual network connecting a set of instances. XOS can also create a virtual network by directly calling VTN without Neutron's involvement (e.g,. to interconnect Docker containers).
POST onos/cordvtn/servicePorts
Create a service port
GET onos/cordvtn/servicePorts
List service ports including service port details
GET onos/cordvtn/servicePorts/{port_id}
Show service port details
DELETE onos/cordvtn/servicePorts/{port_id}
Delete a service port
Parameters | Type | Description |
---|---|---|
id * | UUID | The UUID of the service port. |
network_id * | UUID | The UUID of the attached service network. |
name * | string | The name of the port on the switch. |
vlan_id | number | VLAN ID of the port interface. |
mac_address | string | The MAC address of the port interface. |
ip_address | string | The IP address of the port interface. |
floating_address_pairs | list | Additional public addresses allowed to the port interface. |
ip_address | string | Additional public IP address. |
mac_address | string | Additional MAC address mapped to the public IP address. |
NOTE:
*
fields are mandatory for creating a new service port.
Example json request:
{ "ServicePort":{ "id":"b8ba3d85-1dec-49f9-8503-6f1b90399152", "network_id":"0f30807c-fce0-4fa5-9c36-99ff6d4d0ae1", "name":"tapb8ba3d85-1d", "vlan_id":222, "mac_address":"FA:16:3E:56:77:45", "ip_address":"10.0.2.2", "floating_address_pairs":[ { "ip_address":"10.6.1.131", "mac_address":"02:42:0A:06:01:83" }, { "ip_address":"10.6.1.130", "mac_address":"02:42:0A:06:01:82" } ] } }
POST onos/cordvtn/serviceNetworks
Create a service network
GET onos/cordvtn/serviceNetworks
List service networks including the details
GET onos/cordvtn/serviceNetworks/{network_id}
Show service network details
PUT onos/cordvtn/serviceNetworks/{network_id}
Update a service network dependencies
DELETE onos/cordvtn/serviceNetworks/{network_id}
Delete a service network
Parameters | Type | Description |
---|---|---|
id * | UUID | The UUID of the service network. |
name | string | The name of the service network. |
type * | string | The type of the service network |
segment_id | integer | The ID of the isolated segment on the physical network. Currently, only VXLAN based isolation is supported and this ID is a VNI. |
subnet | string | The associated subnet. |
providers | list | The list of the provider service networks. |
id | string | The UUID of the provider service network. |
bidirectional | boolean | The dependency, which is bidirectional (true) or unidirectional (false). |
NOTE:
*
fields are mandatory for creating a new service port.
Example json request:
{ "ServiceNetwork":{ "id":"e4974238-448c-4b5c-9a45-b27c9477eb6a", "name":"mysite_one-access", "type":"PRIVATE", "segment_id":1018, "subnet":"10.0.3.0/24", "service_ip":"10.0.3.1", "providers":[ { "id": "71cc8c93-f809-42ff-b1d6-0c8d92c6cd2b", "bidirectional": true } ] } }
Two of CORD's core models play a role in service composition, and hence, in the XOS/VTN interaction.
The first is the ServiceDependency model, which defines an edge in the Service Graph, connecting a consumer service to a provider service. XOS uses this model to instruct VTN in how to interconnect the two services in the underlying data plane. This interconnection is specified by a connect_method
field, with the following values currently supported:
None
No network connectivity is provided (services not connected in data plane)
Public
Connected via a public network (currently implemented by vRouter)
Private-unidirectional
Connected via a private network with unidirectional connectivity (currently implemented by VTN)
Private-bidirectional
Connected via a private network with bidirectional connectivity (currently implemented by VTN)
Other
Connected via some other network (how specified is TBD)
NOTE: The
Other
choice does not currently exist. We expect to add it in the near future as we reconcile how networks are parameterized (see below).
The second is the NetworkTemplate model, which defines the parameters by which all networks are set up, including any VTN-provided networks (which corresponds to the situation where connect_method = Private
). This model includes a vtn_kind
field, with the following values currently supported:
PRIVATE
Provides a private network for the instances in the same service
PUBLIC
Provides an externally accessible network public network
MANAGEMENT_LOCAL
Provides a node-local (virtual) management network
MANAGEMENT_HOST
Provides a CORD-wide (physical) management network
VSG
Provides an access-side network
ACCESS_AGENT
Provides a network for access agent infrastructure service
NOTE: The NetworkTemplate model needs to be cleaned up and reconciled with the ServiceDependency model. For example, there are currently three different places one can specify some version of public versus private, and the
choices
imposed on various fields are not currently enforced. The logic that controls how XOS invokes VTN can be found in the VTN synchronizer, and can be summarized as follows: If a ServiceDependency exists between Services A and B, then VTN will connect every eligible Network in A to every eligible network in B, where a network is eligible if its NetworkTemplate'svtn_kind
field is set ofVSG
orPrivate
.
Hardcoded dependencies to VRouterTenant
have been eliminated. It's now assumed that any ServiceInstance that has public_ip
and public_mac
fields provides the addressing functionality that VRouterTenant used to provide.
The VTN synchronizer will compute additional addresses attached to a port based on the following criteria:
vm_vrouter_tag
or vm_public_service_instance
tag attached to it, and that tag points to a ServiceInstance that has public_ip
and public_mac
fields, then that address pair will be added to the ports for any access networks on that instance.vm_vrouter_tag
is deprecated in favor of the service-neutron name vm_public_service_instance
.
SerivceInstanceLink
to a ServiceInstance that has public_ip
and public_mac
fields, then that address pair will be added to the ports for any access networks on that instance.A port will be given a vlan_id
if there exists a vlan_id
or s_tag
tag associated with the instance, and that port is an access network.
s_tag
is deprecated in favor of the service-neutral name vlan_id
.
A network is an access network (i.e. supports vlan_id and address_pairs) if it's VTN kind is in the set ["VSG", ]
.
The VTN synchronizer determines public gateways by examining AddressPool
objects. Each AddressPool
has a gateway_ip
and gateway_mac
field.
VTN Implements two sync steps.
This syncstep pushes VTN app configuration to ONOS. This is a straightforward mapping of values in the VTNService
model into an ONOS network configuration dictionary:
data = { "apps" : { "org.opencord.vtn" : { "cordvtn" : { "privateGatewayMac" : privateGatewayMac, "localManagementIp": localManagementIp, "ovsdbPort": ovsdbPort, "ssh": { "sshPort": sshPort, "sshUser": sshUser, "sshKeyFile": sshKeyFile }, "xos": { "endpoint": xosEndpoint, "user": xosUser, "password": xosPassword }, "publicGateways": [], "nodes" : [], "controllers": [controllerPort] } } } }
This sync step handles computing service composition. It looks at all XOS services, and all networks that interconnect services. From this information it generates data that is posted to the VTN ServiceNetwork
endpoint.
The syncstep also examines all Port
objects, and from each Port
computes a ServicePort
which is posted to the VTN ServicePort
endpoint.
If a Network
or Port
has been deleted from XOS, then the syncstep will call the appropriate ONOS delete method.