github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/routes/doc.go (about) 1 /* 2 Package routes enables management and retrieval of Routes 3 Route service. 4 5 Example to List Routes 6 7 listroute:=routes.ListOpts{VPC_ID:"93e94d8e-31a6-4c22-bdf7-8b23c7b67329"} 8 out,err:=routes.List(client,listroute) 9 fmt.Println(out[0].RouteID) 10 11 12 Example to Create a Route 13 14 route:=routes.CreateOpts{ 15 Type:"peering", 16 NextHop:"d2dea4ba-e988-4e9c-8162-652e74b2560c", 17 Destination:"192.168.0.0/16", 18 VPC_ID:"3127e30b-5f8e-42d1-a3cc-fdadf412c5bf"} 19 outroute,err:=routes.Create(client,route).Extract() 20 fmt.Println(outroute) 21 22 23 Example to Delete a Route 24 25 out:=routes.Delete(client,"39a07dcb-f30e-41c1-97ac-182c8f0d43c1") 26 fmt.Println(out) 27 */ 28 package routes