Exemplo n.º 1
0
Arquivo: client.go Projeto: osrg/gobgp
func (cli *GoBGPClient) DeletePolicyAssignment(assignment *table.PolicyAssignment, all bool) error {
	a := api.NewAPIPolicyAssignmentFromTableStruct(assignment)
	_, err := cli.cli.DeletePolicyAssignment(context.Background(), &api.DeletePolicyAssignmentRequest{
		Assignment: a,
		All:        all})
	return err
}
Exemplo n.º 2
0
Arquivo: client.go Projeto: osrg/gobgp
func (cli *GoBGPClient) ReplacePolicyAssignment(assignment *table.PolicyAssignment) error {
	_, err := cli.cli.ReplacePolicyAssignment(context.Background(), &api.ReplacePolicyAssignmentRequest{
		Assignment: api.NewAPIPolicyAssignmentFromTableStruct(assignment),
	})
	return err
}