Skip to content

Commit

Permalink
adf
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig-Spencer-12 committed Jun 25, 2024
1 parent 943f676 commit b9d2985
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/local/activate.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ func (service *ProvisioningService) ActivateACM() error {

generalSettings, err := service.interfacedWsmanMessage.GetGeneralSettings()
if err != nil {
log.Error("failed to get general settings")
return utils.WSMANMessageError
}

getHostBasedSetupResponse, err := service.interfacedWsmanMessage.GetHostBasedSetupService()
if err != nil {
log.Error("failed to get host based setup service response")
return utils.WSMANMessageError
}
decodedNonce := getHostBasedSetupResponse.Body.GetResponse.ConfigurationNonce
Expand Down Expand Up @@ -118,11 +120,13 @@ func (service *ProvisioningService) ActivateACM() error {
func (service *ProvisioningService) ActivateCCM() error {
generalSettings, err := service.interfacedWsmanMessage.GetGeneralSettings()
if err != nil {
return utils.ActivationFailed
log.Error("failed to get general settings")
return utils.WSMANMessageError
}
_, err = service.interfacedWsmanMessage.HostBasedSetupService(generalSettings.Body.GetResponse.DigestRealm, service.config.Password)
if err != nil {
return utils.ActivationFailed
log.Error("host based setup service failed")
return utils.WSMANMessageError
}
log.Info("Status: Device activated in Client Control Mode")
return nil
Expand Down

0 comments on commit b9d2985

Please sign in to comment.