summaryrefslogtreecommitdiffhomepage
path: root/client/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/client.go b/client/client.go
index c62310a3..60fbee1c 100644
--- a/client/client.go
+++ b/client/client.go
@@ -691,24 +691,23 @@ func (cli *Client) GetRouteServerExportPolicy(name string) (*table.PolicyAssignm
return cli.getPolicyAssignment(name, table.POLICY_DIRECTION_EXPORT)
}
-func (cli *Client) AddPolicyAssignment(assignment *table.PolicyAssignment) error {
+func (cli *Client) AddPolicyAssignment(assignment *api.PolicyAssignment) error {
_, err := cli.cli.AddPolicyAssignment(context.Background(), &api.AddPolicyAssignmentRequest{
- Assignment: api.NewAPIPolicyAssignmentFromTableStruct(assignment),
+ Assignment: assignment,
})
return err
}
-func (cli *Client) DeletePolicyAssignment(assignment *table.PolicyAssignment, all bool) error {
- a := api.NewAPIPolicyAssignmentFromTableStruct(assignment)
+func (cli *Client) DeletePolicyAssignment(assignment *api.PolicyAssignment, all bool) error {
_, err := cli.cli.DeletePolicyAssignment(context.Background(), &api.DeletePolicyAssignmentRequest{
- Assignment: a,
+ Assignment: assignment,
All: all})
return err
}
-func (cli *Client) ReplacePolicyAssignment(assignment *table.PolicyAssignment) error {
+func (cli *Client) ReplacePolicyAssignment(assignment *api.PolicyAssignment) error {
_, err := cli.cli.ReplacePolicyAssignment(context.Background(), &api.ReplacePolicyAssignmentRequest{
- Assignment: api.NewAPIPolicyAssignmentFromTableStruct(assignment),
+ Assignment: assignment,
})
return err
}