()
| 48 | type CmdExecute func(response *trident.SyncResponse) |
| 49 | |
| 50 | func regiterCommand() []*cobra.Command { |
| 51 | platformDataCmd := &cobra.Command{ |
| 52 | Use: "platform-data", |
| 53 | Short: "get platform-data from deepflow-server", |
| 54 | Run: func(cmd *cobra.Command, args []string) { |
| 55 | initCmd(cmd, []CmdExecute{platformData}) |
| 56 | }, |
| 57 | } |
| 58 | |
| 59 | ipGroupsCmd := &cobra.Command{ |
| 60 | Use: "ip-groups", |
| 61 | Short: "get ip groups from deepflow-servr", |
| 62 | Run: func(cmd *cobra.Command, args []string) { |
| 63 | initCmd(cmd, []CmdExecute{ipGroups}) |
| 64 | }, |
| 65 | } |
| 66 | |
| 67 | flowAclsCmd := &cobra.Command{ |
| 68 | Use: "flow-acls", |
| 69 | Short: "get flow-acls from deepflow-server", |
| 70 | Run: func(cmd *cobra.Command, args []string) { |
| 71 | initCmd(cmd, []CmdExecute{flowAcls}) |
| 72 | }, |
| 73 | } |
| 74 | |
| 75 | tapTypesCmd := &cobra.Command{ |
| 76 | Use: "tap-types", |
| 77 | Short: "get tap-types from deepflow-server", |
| 78 | Run: func(cmd *cobra.Command, args []string) { |
| 79 | initCmd(cmd, []CmdExecute{tapTypes}) |
| 80 | }, |
| 81 | } |
| 82 | |
| 83 | segmentsCmd := &cobra.Command{ |
| 84 | Use: "segments", |
| 85 | Short: "get segments from deepflow-server", |
| 86 | Run: func(cmd *cobra.Command, args []string) { |
| 87 | initCmd(cmd, []CmdExecute{segments}) |
| 88 | }, |
| 89 | } |
| 90 | |
| 91 | containersCmd := &cobra.Command{ |
| 92 | Use: "containers", |
| 93 | Short: "get containers from deepflow-server", |
| 94 | Run: func(cmd *cobra.Command, args []string) { |
| 95 | initCmd(cmd, []CmdExecute{containers}) |
| 96 | }, |
| 97 | } |
| 98 | |
| 99 | vpcIPCmd := &cobra.Command{ |
| 100 | Use: "vpc-ip", |
| 101 | Short: "get vpc-ip from deepflow-server", |
| 102 | Run: func(cmd *cobra.Command, args []string) { |
| 103 | initCmd(cmd, []CmdExecute{vpcIP}) |
| 104 | }, |
| 105 | } |
| 106 | |
| 107 | skipInterfaceCmd := &cobra.Command{ |
no test coverage detected