The networking_cisco.apps.saf.server.dfa_openstack_helper Module

class networking_cisco.apps.saf.server.dfa_openstack_helper.DfaNeutronHelper

Bases: object

Helper Routines for Neutron.

add_intf_router(rout_id, tenant_id, subnet_lst)

Add the interfaces to a router.

create_network(name, tenant_id, subnet, gw=None)

Create the openstack network, including the subnet.

create_router(name, tenant_id, subnet_lst)

Create a openstack router and add the interfaces.

delete_intf_router(name, tenant_id, rout_id, subnet_lst)

Delete the openstack router and remove the interfaces attached.

delete_network(name, tenant_id, subnet_id, net_id)

Delete the openstack subnet and network.

delete_network_all_subnets(net_id)

Delete the openstack network including all its subnets.

delete_network_subname(sub_name)

Delete the network by part of its name, use with caution.

delete_router(name, tenant_id, rout_id, subnet_lst)

Delete the openstack router.

Delete the router and remove the interfaces attached to it.

delete_router_by_name(rtr_name, tenant_id)

Delete the openstack router and its interfaces given its name.

The interfaces should be already removed prior to calling this function.

find_rtr_namespace(rout_id)

Find the namespace associated with the router.

get_all_subnets_cidr(no_mask=False)

Returns all the subnets.

get_fw(fw_id)

Return the Firewall given its ID.

get_fw_policy(policy_id)

Return the firewall policy, given its ID.

get_fw_rule(rule_id)

Return the firewall rule, given its ID.

get_network_by_name(nwk_name)

Search for a openstack network by name.

get_network_by_tenant(tenant_id)

Returns the network of a given tenant.

get_router_intf(router_id)

Retrieve the router interfaces. Incomplete, TODO(padkrish).

get_router_port_subnet(subnet_id)
get_rtr_by_name(rtr_name)

Search a router by its name.

get_rtr_name(router_id)

Retrieve the router name. Incomplete.

get_subnet_cidr(subnet_id)

retrieve the CIDR associated with a subnet, given its ID.

get_subnet_nwk_excl(tenant_id, excl_list, excl_part=False)

Retrieve the subnets of a network.

Get the subnets inside a network after applying the exclusion list.

get_subnets_for_net(net)

Returns the subnets in a network.

is_subnet_present(subnet_addr)

Returns if a subnet is present.

neutronclient

Returns client object.

program_rtr(args, rout_id, namespace=None)

Execute the command against the namespace.

program_rtr_all_nwk_next_hop(tenant_id, rout_id, next_hop, excl_list)

Program the next hop for all networks of a tenant.

program_rtr_default_gw(tenant_id, rout_id, gw)

Program the default gateway of a router.

program_rtr_nwk_next_hop(rout_id, next_hop, cidr)

Program the next hop for all networks of a tenant.

program_rtr_return(args, rout_id, namespace=None)

Execute the command against the namespace and return the result.

remove_rtr_nwk_next_hop(rout_id, next_hop, subnet_lst, excl_list)

Remove the next hop for all networks of a tenant.