File tree Expand file tree Collapse file tree
agent/src/com/cloud/agent/resource/consoleproxy
server/src/com/cloud/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,14 +109,13 @@ public Answer executeRequest(final Command cmd) {
109109
110110 protected Answer execute (final UpdateCertificateCommand cmd ) {
111111 boolean success = false ;
112- try {
112+ try
113+ {
113114 String certificate = cmd .getCertificate ();
114-
115115 //write the cert to /etc/cloud/consoleproxy/cert/
116116 boolean dirCreated = false ;
117117 String strDirectoy = "/etc/cloud/consoleproxy/cert/" ;
118118 dirCreated = (new File (strDirectoy )).mkdirs ();
119-
120119 if (dirCreated )
121120 {
122121 if (s_logger .isDebugEnabled ())
@@ -128,13 +127,13 @@ protected Answer execute(final UpdateCertificateCommand cmd) {
128127 //Close the output stream
129128 out .close ();
130129 success = true ;
131- }
132- return new Answer (cmd , success , "Custom certificate update required status" );
130+ }
133131 }catch (Exception e )
134132 {
135133 s_logger .error ("Unable to read the cert string in console proxy resource" ,e );
136134 success = false ;
137135 }
136+
138137 return new Answer (cmd , success , "Custom certificate response from the updatecertificate flow" );
139138 }
140139
Original file line number Diff line number Diff line change @@ -5880,11 +5880,9 @@ public boolean uploadCertificate(UploadCustomCertificateCmd cmd) throws Resource
58805880 //certficate uploaded to db successfully
58815881 //get a list of all Console proxies from the cp table
58825882 List <ConsoleProxyVO > cpList = _consoleProxyDao .listAll ();
5883-
58845883 for (ConsoleProxyVO cp : cpList )
58855884 {
58865885 HostVO cpHost = _hostDao .findConsoleProxyHost (cp .getName (), com .cloud .host .Host .Type .ConsoleProxy );
5887-
58885886 //now send a command to each console proxy
58895887 UpdateCertificateCommand certCmd = new UpdateCertificateCommand (_certDao .findById (certVOId ).getCertificate ());
58905888 try {
@@ -5900,10 +5898,8 @@ public boolean uploadCertificate(UploadCustomCertificateCmd cmd) throws Resource
59005898 s_logger .warn ("Unable to send update certificate command to the console proxy resource" , e );
59015899 } catch (OperationTimedoutException e ) {
59025900 s_logger .warn ("Unable to send update certificate command to the console proxy resource" , e );
5903- }
5904-
5901+ }
59055902 }
5906-
59075903 return true ;
59085904 }
59095905 else
You can’t perform that action at this time.
0 commit comments