The networking_cisco.apps.saf.server.cisco_dfa_rest
Module¶
This module provides APIs for communicating with DCNM.
-
class
networking_cisco.apps.saf.server.cisco_dfa_rest.
DFARESTClient
(cfg)¶ Bases:
object
DFA client class that provides APIs to interact with DCNM.
-
config_profile_fwding_mode_get
(profile_name)¶ Return forwarding mode of given config profile.
-
config_profile_list
()¶ Return config profile list from DCNM.
-
create_network
(tenant_name, network, subnet, dhcp_range=True)¶ Create network on the DCNM.
Parameters: - tenant_name – name of tenant the network belongs to
- network – network parameters
- subnet – subnet parameters of the network
-
create_partition
(org_name, part_name, dci_id, vrf_prof, service_node_ip=None, desc=None)¶ Create partition on the DCNM.
Parameters: - org_name – name of organization to be created
- part_name – name of partition to be created
- dci_id – DCI ID
- service_node_ip – Specifies the Default route IP address.
- desc – string that describes organization
Vrf_prof: VRF profile for the partition
-
create_project
(orch_id, org_name, part_name, dci_id, desc=None)¶ Create project on the DCNM.
Parameters: - orch_id – orchestrator ID
- org_name – name of organization.
- part_name – name of partition.
- dci_id – Data Center interconnect id.
- desc – description of project.
-
create_service_network
(tenant_name, network, subnet, dhcp_range=True)¶ Create network on the DCNM.
Parameters: - tenant_name – name of tenant the network belongs to
- network – network parameters
- subnet – subnet parameters of the network
-
delete_network
(tenant_name, network)¶ Delete network on the DCNM.
Parameters: - tenant_name – name of tenant the network belongs to
- network – object that contains network parameters
-
delete_partition
(org_name, partition_name)¶ Send partition delete request to DCNM.
Parameters: partition_name – name of partition to be deleted
-
delete_project
(tenant_name, part_name)¶ Delete project on the DCNM.
Parameters: - tenant_name – name of project.
- part_name – name of partition.
-
delete_service_network
(tenant_name, network)¶ Delete service network on the DCNM.
Parameters: - tenant_name – name of tenant the network belongs to
- network – object that contains network parameters
-
fill_urls
()¶ This assigns the URL’s based on the protocol.
-
get_config_profile_for_network
(net_name)¶ Get the list of profiles.
-
get_dcnm_protocol
()¶ Routine to find out if DCNM is using http or https.
DCNM 10 (Fuji-4) and above does not support http. Only https is supported and enabled by default. Prior DCNM versions supported both http and https. But, only http was enabled by default. So, enabler needs to find out if DCNM is supporting http or https to be friendly with the existing installed setups.
-
get_network
(org, segid)¶ Return given network from DCNM.
Parameters: - org – name of organization.
- segid – segmentation id of the network.
-
get_partition_dciId
(org_name, part_name, part_info=None)¶ get DCI ID for the partition.
Parameters: - org_name – name of organization
- part_name – name of partition
-
get_partition_segmentId
(org_name, part_name, part_info=None)¶ get partition Segment ID from the DCNM.
Parameters: - org_name – name of organization
- part_name – name of partition
-
get_partition_serviceNodeIp
(org_name, part_name, part_info=None)¶ get Service Node IP address from the DCNM.
Parameters: - org_name – name of organization
- part_name – name of partition
-
get_partition_vrfProf
(org_name, part_name=None, part_info=None)¶ get VRF Profile for the partition from the DCNM.
Parameters: - org_name – name of organization
- part_name – name of partition
-
get_segmentid_range
(orchestrator_id)¶ Get segment id range from DCNM.
-
get_version
()¶ Get the DCNM version.
-
list_networks
(org, part)¶ Return list of networks from DCNM.
Parameters: - org – name of organization.
- part – name of partition.
-
list_organizations
()¶ Return list of organizations from DCNM.
-
set_segmentid_range
(orchestrator_id, segid_min, segid_max)¶ set segment id range in DCNM.
-
update_partition_static_route
(org_name, part_name, static_ip_list, vrf_prof=None, service_node_ip=None)¶ Send static route update requests to DCNM.
Parameters: - org_name – name of organization
- part_name – name of partition
Static_ip_list: List of static IP addresses
Vrf_prof: VRF Profile
Service_node_ip: Service Node IP address
-
update_project
(org_name, part_name, dci_id=-1, service_node_ip=‘0.0.0.0’, vrf_prof=None, desc=None)¶ Update project on the DCNM.
Parameters: - org_name – name of organization.
- part_name – name of partition.
- dci_id – Data Center interconnect id.
- desc – description of project.
-
update_segmentid_range
(orchestrator_id, segid_min, segid_max)¶ update segment id range in DCNM.
-