-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2948 from MaxMcAdam/anax-2883
Issue 2883 - AgentAutoUpgrade: Add node management worker in anax to …
- Loading branch information
Showing
16 changed files
with
788 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package nodemanagement | ||
|
||
import ( | ||
"fmt" | ||
"github.com/open-horizon/anax/events" | ||
) | ||
|
||
type NodeRegisteredCommand struct { | ||
Msg *events.EdgeRegisteredExchangeMessage | ||
} | ||
|
||
func (d NodeRegisteredCommand) ShortString() string { | ||
return fmt.Sprintf("Msg: %v", d.Msg) | ||
} | ||
|
||
func (d NodeRegisteredCommand) String() string { | ||
return d.ShortString() | ||
} | ||
|
||
func NewNodeRegisteredCommand(msg *events.EdgeRegisteredExchangeMessage) *NodeRegisteredCommand { | ||
return &NodeRegisteredCommand{ | ||
Msg: msg, | ||
} | ||
} | ||
|
||
type NMPDownloadCompleteCommand struct { | ||
Msg *events.NMPDownloadCompleteMessage | ||
} | ||
|
||
func (n NMPDownloadCompleteCommand) String() string { | ||
return fmt.Sprintf("Msg: %v", n.Msg) | ||
} | ||
|
||
func (n NMPDownloadCompleteCommand) ShortString() string { | ||
return n.String() | ||
} | ||
|
||
func NewNMPDownloadCompleteCommand(msg *events.NMPDownloadCompleteMessage) *NMPDownloadCompleteCommand { | ||
return &NMPDownloadCompleteCommand{Msg: msg} | ||
} | ||
|
||
type NodeShutdownCommand struct { | ||
Msg *events.NodeShutdownMessage | ||
} | ||
|
||
func (n NodeShutdownCommand) ShortString() string { | ||
return fmt.Sprintf("NodeShutdownCommand Msg: %v", n.Msg) | ||
} | ||
|
||
func NewNodeShutdownCommand(msg *events.NodeShutdownMessage) *NodeShutdownCommand { | ||
return &NodeShutdownCommand{ | ||
Msg: msg, | ||
} | ||
} |
Oops, something went wrong.