Skip to content

Commit

Permalink
Issue 3986 - AgentImageCleanup: Agent handles new type of NMP
Browse files Browse the repository at this point in the history
Signed-off-by: Max McAdam <[email protected]>
  • Loading branch information
MaxMcAdam committed Apr 22, 2024
1 parent 6c81194 commit cd8f042
Show file tree
Hide file tree
Showing 3 changed files with 421 additions and 390 deletions.
19 changes: 19 additions & 0 deletions exchangecommon/node_management_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type ExchangeNodeManagementPolicy struct {
PolicyUpgradeTime string `json:"start"`
UpgradeWindowDuration int `json:"startWindow"`
AgentAutoUpgradePolicy *ExchangeAgentUpgradePolicy `json:"agentUpgradePolicy,omitempty"`
AgentImagePolicy *ExchangeAgentImagePolicy `json:"agentImagePolicy,omitempty"`
LastUpdated string `json:"lastUpdated,omitempty"`
Created string `json:"created,omitempty"`
}
Expand Down Expand Up @@ -135,3 +136,21 @@ type AgentFileVersions struct {
func (a AgentFileVersions) String() string {
return fmt.Sprintf("SoftwareVersions: %v, ConfigVersions: %v, CertVersions: %v", a.SoftwareVersions, a.ConfigVersions, a.CertVersions)
}

type ExchangeAgentImagePolicy struct {
Removal []ImageRemovalPolicy `json:"imageRemovalPolicies,omitempty"`
}

func (e ExchangeAgentImagePolicy) String() string {
str := "Removal: "
for _, pol := range e.Removal {
str = str + fmt.Sprintf(" %v", pol)
}
return str
}

type ImageRemovalPolicy struct {
ImageId string `json:"imageId"`
DeleteAfterMinutes uint64 `json:"deleteAfterMinutes"`
AgentDownloadedOnly bool `json:"agentDownloadedOnly"`
}
Loading

0 comments on commit cd8f042

Please sign in to comment.