Skip to content

Commit 813f1dd

Browse files
author
Vipin Jain
authored
Merge pull request #539 from gaurav-dalvi/fix-22ndAug
Solving Issue #537, #525 #532
2 parents e402723 + 8cbcd4e commit 813f1dd

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

netctl/netctl.go

+11-12
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func deletePolicy(ctx *cli.Context) {
5858
}
5959

6060
func listPolicies(ctx *cli.Context) {
61-
if len(ctx.Args()) != 1 {
61+
if len(ctx.Args()) != 0 {
6262
errExit(ctx, exitHelp, "More arguments than required", true)
6363
}
6464

@@ -295,7 +295,7 @@ func listNetProfiles(ctx *cli.Context) {
295295
bandwidth string
296296
bw []string
297297
)
298-
if len(ctx.Args()) != 1 {
298+
if len(ctx.Args()) != 0 {
299299
errExit(ctx, exitHelp, "More arguments than required", true)
300300
}
301301

@@ -464,7 +464,7 @@ func inspectNetwork(ctx *cli.Context) {
464464
}
465465

466466
func listNetworks(ctx *cli.Context) {
467-
if len(ctx.Args()) != 1 {
467+
if len(ctx.Args()) != 0 {
468468
errExit(ctx, exitHelp, "More arguments than required", true)
469469
}
470470

@@ -543,7 +543,7 @@ func deleteTenant(ctx *cli.Context) {
543543
}
544544

545545
func listTenants(ctx *cli.Context) {
546-
if len(ctx.Args()) != 1 {
546+
if len(ctx.Args()) != 0 {
547547
errExit(ctx, exitHelp, "More arguments than required", true)
548548
}
549549

@@ -619,7 +619,6 @@ func createEndpointGroup(ctx *cli.Context) {
619619
}
620620

621621
func inspectEndpointGroup(ctx *cli.Context) {
622-
argCheck(1, ctx)
623622

624623
tenant := ctx.String("tenant")
625624
endpointGroup := ctx.Args()[0]
@@ -646,7 +645,7 @@ func deleteEndpointGroup(ctx *cli.Context) {
646645
}
647646

648647
func listEndpointGroups(ctx *cli.Context) {
649-
if len(ctx.Args()) != 1 {
648+
if len(ctx.Args()) != 0 {
650649
errExit(ctx, exitHelp, "More arguments than required", true)
651650
}
652651

@@ -752,7 +751,7 @@ func deleteBgp(ctx *cli.Context) {
752751
//listBgpNeighbors is netctl interface routine to list
753752
//Bgp neighbor configs for a given host
754753
func listBgp(ctx *cli.Context) {
755-
if len(ctx.Args()) != 1 {
754+
if len(ctx.Args()) != 0 {
756755
errExit(ctx, exitHelp, "More arguments than required", true)
757756
}
758757

@@ -803,7 +802,7 @@ func inspectBgp(ctx *cli.Context) {
803802
}
804803

805804
func showGlobal(ctx *cli.Context) {
806-
if len(ctx.Args()) != 1 {
805+
if len(ctx.Args()) != 0 {
807806
errExit(ctx, exitHelp, "More arguments than required", true)
808807
}
809808

@@ -825,7 +824,7 @@ func showGlobal(ctx *cli.Context) {
825824
}
826825

827826
func inspectGlobal(ctx *cli.Context) {
828-
if len(ctx.Args()) != 1 {
827+
if len(ctx.Args()) != 0 {
829828
errExit(ctx, exitHelp, "More arguments than required", true)
830829
}
831830

@@ -889,7 +888,7 @@ func dumpInspectList(ctx *cli.Context, list interface{}) {
889888
}
890889

891890
func showVersion(ctx *cli.Context) {
892-
if len(ctx.Args()) != 1 {
891+
if len(ctx.Args()) != 0 {
893892
errExit(ctx, exitHelp, "More arguments than required", true)
894893
}
895894

@@ -959,7 +958,7 @@ func deleteAppProfile(ctx *cli.Context) {
959958
}
960959

961960
func listAppProfiles(ctx *cli.Context) {
962-
if len(ctx.Args()) != 1 {
961+
if len(ctx.Args()) != 0 {
963962
errExit(ctx, exitHelp, "More arguments than required", true)
964963
}
965964

@@ -1130,7 +1129,7 @@ func listServiceLB(ctx *cli.Context) {
11301129
}
11311130

11321131
func listExternalContracts(ctx *cli.Context) {
1133-
if len(ctx.Args()) != 1 {
1132+
if len(ctx.Args()) != 0 {
11341133
errExit(ctx, exitHelp, "More arguments than required", true)
11351134
}
11361135

0 commit comments

Comments
 (0)