Added model files for the Rest Messages
[ealt-edge.git] / ocd / cli / ealt / cmd / applcmpkg / start.go
index 8c81bd1..f555eac 100644 (file)
@@ -28,9 +28,10 @@ func NewApplcmStartCommand() *cobra.Command {
                Short: "To start the application instance on MEP Node",
                Long:  `To start the application instance on MEP Node`,
                RunE: func(cmd *cobra.Command, args []string) error {
-                       appIdArg := cmd.Flag("appid")
-                       applicationId := appIdArg.Value.String()
-                       err := adapter.BuilderRequest(applicationId, "NewApplcmStartCommand")
+                       theFlags := []string{cmd.Flag("appid").Value.String(),
+                               cmd.Flag("hostname").Value.String(),
+                               cmd.Flag("hostip").Value.String()}
+                       err := adapter.BuilderRequest(theFlags, "NewApplcmStartCommand")
                        if err != nil {
                                return err
                        }
@@ -38,5 +39,10 @@ func NewApplcmStartCommand() *cobra.Command {
                },
        }
        cmd.Flags().StringP("appid", "i", "", "Application Instance ID to be started")
+       cmd.Flags().StringP("hostname", "n", "", "Host Name where the App has to be instantiated")
+       cmd.Flags().StringP("hostip", "o", "", "Host IP / MEP Node IP")
+       cmd.MarkFlagRequired("appid")
+       cmd.MarkFlagRequired("hostname")
+       cmd.MarkFlagRequired("hostip")
        return cmd
 }