Skip to content

Commit

Permalink
Workaround to edit the SSHService
Browse files Browse the repository at this point in the history
Removing the space from the name of the SSHService to enable editing
it throught SOMA interface.
  • Loading branch information
vvidovic-croz committed Mar 22, 2022
1 parent 544ed96 commit 959d9a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions repo/dp/dp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3387,6 +3387,11 @@ func cleanXML(inputXML string) (string, error) {
re = regexp.MustCompile(` read-only="[a-z]+"`)
outputXML = re.ReplaceAllString(outputXML, "")

// Remove space from the name attribute from the SSH Service - otherwise update fails.
// <SSHService name="SSH Service" intrinsic="true">
re = regexp.MustCompile(`<SSHService name="SSH Service"`)
outputXML = re.ReplaceAllString(outputXML, `<SSHService name="SSH_Service"`)

// Remove XMLFirewall from: MgmtInterface, WebB2BViewer & WebGUI
// otherwise update doesn't work. (?s) - match newlines.
re = regexp.MustCompile(`(?s)(<(MgmtInterface|WebB2BViewer|WebGUI) .+?)(<XMLFirewall .+?</XMLFirewall>)(.*?</(MgmtInterface|WebB2BViewer|WebGUI)>)`)
Expand Down

0 comments on commit 959d9a5

Please sign in to comment.