handler

package
v0.1.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

MIT License Copyright(c) 2022 Futurewei Cloud

Permission is hereby granted,
free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License Copyright(c) 2022 Futurewei Cloud

Permission is hereby granted,
free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

View Source
var (
	SDN_IP   = "sdn-controller.merak.svc.cluster.local"
	SDN_PORT = "6653"
	Ctx      = context.Background()
)

Functions

func Create

func Create(k8client *kubernetes.Clientset, topo_id string, aca_num uint32, rack_num uint32, aca_per_rack uint32, cgw_num uint32, data_plane_cidr string, ports_per_vswitch uint32, images []*pb.InternalTopologyImage, returnMessage *pb.ReturnTopologyMessage) error

function CREATE

save the part of gw creation and mac learning for future requirment, comment the related code now

func CreateTopologyClasses

func CreateTopologyClasses(client dynamic.Interface, name string, links []database.Vlink) error

func Create_multiple_layers_vswitches

func Create_multiple_layers_vswitches(vhost_num int, rack_num int, vhosts_per_rack int, ports_per_vswitch int, data_plane_cidr string) (error, database.TopologyData)

func Delete

func Delete(k8client *kubernetes.Clientset, topo_id string) error

func DeleteTopologyClasses

func DeleteTopologyClasses(client dynamic.Interface, name string) error

func GenUUID

func GenUUID() string

func GetTopologyClasses

func GetTopologyClasses(client dynamic.Interface, name string) error

func Info

func Info(k8client *kubernetes.Clientset, topo_id string, returnMessage *pb.ReturnTopologyMessage) error

func NewTopologyClass

func NewTopologyClass(name string, links []database.Vlink) *unstructured.Unstructured

func Pod_query

func Pod_query(k8client *kubernetes.Clientset, pod *corev1.Pod, cmd []string) (string, error)

func QueryHostNode

func QueryHostNode(k8client *kubernetes.Clientset, topo_id string) error

func QueryMac

func QueryMac(k8client *kubernetes.Clientset, topo_id string) error

func Topo_delete

func Topo_delete(k8client *kubernetes.Clientset, topo database.TopologyData) error

func Topo_deploy

func Topo_deploy(k8client *kubernetes.Clientset, aca_image string, ovs_image string, topo database.TopologyData) error

func Topo_save

func Topo_save(topo database.TopologyData) error

save topology to redis

func UpdateComputenodeInfo

func UpdateComputenodeInfo(client *kubernetes.Clientset, topo_id string, returnMessage *pb.ReturnTopologyMessage) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL