ASR1000 L3 Router Service Plugin Contributor Guide

Using DevStack

DevStack is used by developers to install Openstack. It is not intended for production use. For introductory details on DevStack, refer to How to Contribute.

To install the ASR1k L3 router service plugin along with OpenStack using DevStack, do as follows:

  1. Clone DevStack and checkout the branch (ex: stable/ocata, stable/newton, etc) you want to install.
  2. Configure the ASR1k L3 router service plugin in local.conf file as shown in examples which follow.
  3. Run ./stack.sh to install and ./unstack.sh to uninstall.

DevStack Configuration Examples

This section describes how to extend the local.conf file with ASR1k-based L3 routing details for DevStack deployment. These details should follow the section which installs networking-cisco repository as described in How to Contribute.

Append the following lines to local.conf to enable the L3P, DMP and CFGA:

Q_CISCO_ASR1K_ENABLED=True

enable_service ciscocfgagent
enable_service q-ciscorouter
enable_service q-ciscodevicemanager

[[post-config|/etc/neutron/neutron.conf]]

[DEFAULT]
api_extensions_path = extensions:/opt/stack/networking-cisco/networking_cisco/plugins/cisco/extensions

Defining credentials, hosting device templates, hosting devices and router types

DevStack can automatically include definitions of credentials, hosting device templates, hosting devices and router types in configuration files that are given as arguments to neutron server and the CFGA when they are started.

The actual definitions to be included has to be provided to DevStack. This is done using two text files:

  • cisco_device_manager_plugin.inject
  • cisco_router_plugin.inject

If these files exist in the DevStack root directory when the ./stack.sh command is executed, DevStack will append their contents to configuration files that neutron server consumes when it starts.

A cisco_device_manager_plugin.inject sample file

The sample inject file below can be viewed as raw text cisco_device_manager_plugin.inject file.

[hosting_device_credentials]
[cisco_hosting_device_credential:1]
name="Universal credential"
description="Credential used for all hosting devices"
user_name=stack
password=cisco
type=

[hosting_devices_templates]
[cisco_hosting_device_template:1]
name=NetworkNode
enabled=True
host_category=Network_Node
service_types=router:FW:VPN
image=
flavor=
default_credentials_id=1
configuration_mechanism=
protocol_port=22
booting_time=360
slot_capacity=2000
desired_slots_free=0
tenant_bound=
device_driver=networking_cisco.plugins.cisco.device_manager.hosting_device_drivers.noop_hd_driver.NoopHostingDeviceDriver
plugging_driver=networking_cisco.plugins.cisco.device_manager.plugging_drivers.noop_plugging_driver.NoopPluggingDriver

[cisco_hosting_device_template:2]
name="ASR1k template"
enabled=True
host_category=Hardware
service_types=router:FW:VPN
image=
flavor=
default_credentials_id=1
configuration_mechanism=
protocol_port=22
booting_time=360
slot_capacity=4000
desired_slots_free=0
tenant_bound=
device_driver=networking_cisco.plugins.cisco.device_manager.hosting_device_drivers.noop_hd_driver.NoopHostingDeviceDriver
plugging_driver=networking_cisco.plugins.cisco.device_manager.plugging_drivers.hw_vlan_trunking_driver.HwVLANTrunkingPlugDriver

[hosting_devices]
[cisco_hosting_device:2]
template_id=2
credentials_id=1
device_id=SN:abcd1234efgh
admin_state_up=True
management_ip_address=10.86.7.54
protocol_port=22
tenant_bound=
auto_delete=False

[cisco_hosting_device:3]
template_id=2
credentials_id=1
device_id=SN:efgh5678ijkl
admin_state_up=True
management_ip_address=10.86.7.55
protocol_port=22
tenant_bound=
auto_delete=False

[plugging_drivers]
[HwVLANTrunkingPlugDriver:2]
internal_net_interface_1=*:GigabitEthernet0/0/0
external_net_interface_1=*:GigabitEthernet0/0/0

[HwVLANTrunkingPlugDriver:3]
internal_net_interface_1=*:GigabitEthernet0/2/1
external_net_interface_1=*:GigabitEthernet0/2/1

A cisco_router_plugin.inject sample file

The sample inject file below can be viewed as raw text cisco_router_plugin.inject file.

[router_types]
[cisco_router_type:1]
name=Namespace_Neutron_router
description="Neutron router implemented in Linux network namespace"
template_id=1
ha_enabled_by_default=False
shared=True
slot_need=0
scheduler=
driver=
cfg_agent_service_helper=
cfg_agent_driver=

[cisco_router_type:2]
name=ASR1k_router
description="Neutron router implemented in Cisco ASR1k device"
template_id=2
ha_enabled_by_default=True
shared=True
slot_need=1
scheduler=networking_cisco.plugins.cisco.l3.schedulers.l3_router_hosting_device_scheduler.L3RouterHostingDeviceHARandomScheduler
driver=networking_cisco.plugins.cisco.l3.drivers.asr1k.asr1k_routertype_driver.ASR1kL3RouterDriver
cfg_agent_service_helper=networking_cisco.plugins.cisco.cfg_agent.service_helpers.routing_svc_helper.RoutingServiceHelper
cfg_agent_driver=networking_cisco.plugins.cisco.cfg_agent.device_drivers.asr1k.asr1k_routing_driver.ASR1kRoutingDriver

Source Code Location

Code locations for the ASR1k L3 router service plugin, the device manager plugin and the configuration agent are found in the following directory:

networking-cisco install directory/networking_cisco/plugins/cisco

Typically devstack clone the source code to /opt/stack/networking-cisco.