summaryrefslogtreecommitdiffhomepage
path: root/client/client.go
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-06-22 10:43:08 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-06 11:08:15 +0900
commit1dc0124f3e106619ecb10279d8dfe7aa204aaaa5 (patch)
treeca69a8b9d7bd2cacfb821616257a1fc473b8b485 /client/client.go
parentcc92e7e3476f416b533de3f1a68de71c5af476c5 (diff)
cmd: Remove table/ usage from neighbor.go
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
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
}