Camphor Networks Platform API
CamphorDeploymentManager Class Reference

Public Member Functions

def __init__ (self, CamphorProjectSchema schema, CamphorNetworkManager networkManager)
 
None createDataCenter (self, str name='dc', DeviceOS switchOS=DeviceOS.SONiC, DeviceOS serverOS=DeviceOS.ALPINE, switchVersion=None, bool synchronize=True, int pods=1, int racks=2, int leafs=2, int servers=2, int spines=2, int superSpines=0, int borderLeafs=0, int cores=0, int vpns=0, int evpns=0, int hosts=0, int addresses=0, bool generateDefaultConf=True, UnderlayConnectivity underlay=UnderlayConnectivity.ebgp, OverlayConnectivity overlay=OverlayConnectivity.evpn)
 Create a CLOS design based Data Center Network Topology. More...
 
DeploymentConfigurationAttributesDefinition getDeploymentCommonAttributes (self)
 
None setDeploymentCommonAttributes (self, DeploymentConfigurationAttributesDefinition attributes)
 
DeploymentAttributesDefinition createDeployment (self, str name, Optional[DeploymentConfigurationAttributesDefinition] attributes=None, Pods pods=None, Racks racks=None, ItemLeafs leafs=None, Spines spines=None, Servers servers=None, Cores cores=None, SuperSpines superSpines=None, BorderLeafs borderLeafs=None, RouteReflectors routeReflectors=None, BGPTesters bgpTesters=None)
 
List[DeploymentAttributesDefinitiongetDeployment (self)
 
int findDeploymentPosition (self, str name)
 
DeploymentAttributesDefinition findDeployment (self, str name)
 
None deleteDeployment (self, str name)
 

Public Attributes

 schema
 
 networkManager
 

Detailed Description

Definition at line 18 of file camphor_deployment_manager.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
CamphorProjectSchema  schema,
CamphorNetworkManager  networkManager 
)

Definition at line 19 of file camphor_deployment_manager.py.

Member Function Documentation

◆ createDataCenter()

None createDataCenter (   self,
str   name = 'dc',
DeviceOS   switchOS = DeviceOS.SONiC,
DeviceOS   serverOS = DeviceOS.ALPINE,
  switchVersion = None,
bool   synchronize = True,
int   pods = 1,
int   racks = 2,
int   leafs = 2,
int   servers = 2,
int   spines = 2,
int   superSpines = 0,
int   borderLeafs = 0,
int   cores = 0,
int   vpns = 0,
int   evpns = 0,
int   hosts = 0,
int   addresses = 0,
bool   generateDefaultConf = True,
UnderlayConnectivity   underlay = UnderlayConnectivity.ebgp,
OverlayConnectivity   overlay = OverlayConnectivity.evpn 
)

Create a CLOS design based Data Center Network Topology.

Data Centers are one of the most commonly deployed and managed network. Typically, CLOS based network topology is used in forming modern data centers. Using this API to readily instantiate one such!

Parameters
[in]namestr Name of the datacenter
[in]switchOSDeviceOS(DeviceOS.SONiC) Type of the Switches' Network Operating System (NOS)
[in]serverOSDeviceOS(DeviceOS.ALPINE) Type of the Servers'' Operating System (OS)
[in]podsNumber of pods
[in]racksNumber of racks
[in]leafsNumber of leafs
[in]serversNumber of servers
[in]spinesNumber of spines
[in]superSpinesNumber of superSpines
[in]borderLeafsNumber of borderLeafs
[in]coresNumber of cores
[in]vpnsNumber of vpns
[in]evpnsNumber of evpns
[in]hostsNumber of hosts
[in]addressesNumber of addresses
#
# Copyright (C) Camphor Networks, Inc - All Rights Reserved
# Unauthorized copying of this file via any medium is strictly prohibited
# Proprietary and confidential
# Written by Ananth Suryanarayana <ananth@camphornetworks.com>, June 2021
# https://camphornetworks.com/camphor-networks-platform-terms-of-use-and-privacy-policy/
# mailto:info@camphornetworks.com?subject=copyright
#
# yaml-language-server: $schema=/var/lib/camphor/camphor_project_schema.json
#
# Run this command from any camphor cluster node to load this topology!
# export CAMPHOR_PASSWORD='<CamphorPassword>'
# python3 /var/lib/camphor/camphor_api/camphor_manage_device.pyc --oper=load-deployment <yaml-file>
#
---
deployments:
  attributes:
    deviceAttributes:
      os: SONiC
    leafAttributes:
      leafs: 2
    podAttributes:
      pods: 1
    rackAttributes:
      racks: 2
    serverAttributes:
      deviceAttributes:
        os: ALPINE
      servers: 2
    spineAttributes:
      spines: 2
  item:
  - attributes:
      deploymentAttributes:
        type: datacenter
    name: dc

Definition at line 50 of file camphor_deployment_manager.py.

References CamphorDeploymentManager.createDeployment(), CamphorDeploymentManager.networkManager, CamphorManager.networkManager, and CamphorDeploymentManager.setDeploymentCommonAttributes().

+ Here is the call graph for this function:

◆ getDeploymentCommonAttributes()

◆ setDeploymentCommonAttributes()

◆ createDeployment()

DeploymentAttributesDefinition createDeployment (   self,
str  name,
Optional[DeploymentConfigurationAttributesDefinition]   attributes = None,
Pods   pods = None,
Racks   racks = None,
ItemLeafs   leafs = None,
Spines   spines = None,
Servers   servers = None,
Cores   cores = None,
SuperSpines   superSpines = None,
BorderLeafs   borderLeafs = None,
RouteReflectors   routeReflectors = None,
BGPTesters   bgpTesters = None 
)

◆ getDeployment()

◆ findDeploymentPosition()

int findDeploymentPosition (   self,
str  name 
)

Definition at line 101 of file camphor_deployment_manager.py.

References CamphorDeploymentManager.getDeployment().

Referenced by CamphorDeploymentManager.deleteDeployment(), and CamphorDeploymentManager.findDeployment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findDeployment()

DeploymentAttributesDefinition findDeployment (   self,
str  name 
)

Definition at line 108 of file camphor_deployment_manager.py.

References CamphorDeploymentManager.findDeploymentPosition(), and CamphorDeploymentManager.getDeployment().

+ Here is the call graph for this function:

◆ deleteDeployment()

None deleteDeployment (   self,
str  name 
)

Definition at line 112 of file camphor_deployment_manager.py.

References CamphorDeploymentManager.findDeploymentPosition(), and CamphorDeploymentManager.getDeployment().

+ Here is the call graph for this function:

Member Data Documentation

◆ schema

schema

Definition at line 20 of file camphor_deployment_manager.py.

Referenced by CamphorApplicationManager.createApplication(), CamphorBgpTesterManager.createBgpTester(), CamphorClusterManager.createCluster(), CamphorDeploymentManager.createDeployment(), CamphorDeviceManager.createDevice(), CamphorMetricManager.createMetric(), CamphorMonitorManager.createMonitor(), CamphorNetworkManager.createNetwork(), CamphorProjectManager.createProject(), CamphorTableManager.createTable(), CamphorApplicationManager.getApplication(), CamphorApplicationManager.getApplicationCommonAttributes(), CamphorBgpTesterManager.getBgpTester(), CamphorBgpTesterManager.getBgpTesterCommonAttributes(), CamphorClusterManager.getCluster(), CamphorClusterManager.getClusterCommonAttributes(), CamphorDeploymentManager.getDeployment(), CamphorDeploymentManager.getDeploymentCommonAttributes(), CamphorDeviceManager.getDevice(), CamphorDeviceManager.getDeviceCommonAttributes(), CamphorMetricManager.getMetric(), CamphorMetricManager.getMetricCommonAttributes(), CamphorMonitorManager.getMonitor(), CamphorMonitorManager.getMonitorCommonAttributes(), CamphorNetworkManager.getNetwork(), CamphorNetworkManager.getNetworkCommonAttributes(), CamphorProjectManager.getProject(), CamphorProjectManager.getProjectCommonAttributes(), CamphorTableManager.getTable(), CamphorTableManager.getTableCommonAttributes(), CamphorApplicationManager.setApplicationCommonAttributes(), CamphorBgpTesterManager.setBgpTesterCommonAttributes(), CamphorClusterManager.setClusterCommonAttributes(), CamphorDeploymentManager.setDeploymentCommonAttributes(), CamphorDeviceManager.setDeviceCommonAttributes(), CamphorMetricManager.setMetricCommonAttributes(), CamphorMonitorManager.setMonitorCommonAttributes(), CamphorNetworkManager.setNetworkCommonAttributes(), CamphorProjectManager.setProjectCommonAttributes(), CamphorTableManager.setTableCommonAttributes(), and CamphorManager.toYaml().

◆ networkManager


The documentation for this class was generated from the following file: