|
46 | 46 | import java.util.concurrent.TimeUnit; |
47 | 47 | import java.util.function.Predicate; |
48 | 48 | import java.util.stream.Collectors; |
49 | | - |
50 | 49 | import javax.annotation.PostConstruct; |
51 | 50 | import javax.crypto.Mac; |
52 | 51 | import javax.crypto.spec.SecretKeySpec; |
53 | 52 | import javax.inject.Inject; |
54 | 53 | import javax.net.ssl.HttpsURLConnection; |
55 | 54 | import javax.net.ssl.SSLContext; |
56 | 55 | import javax.net.ssl.TrustManager; |
57 | | -// import javax.net.ssl.X509TrustManager; |
58 | | -import javax.naming.ConfigurationException; |
59 | | -import com.cloud.utils.security.CertificateHelper; |
60 | 56 | import org.apache.cloudstack.acl.ControlledEntity; |
61 | 57 | import org.apache.cloudstack.acl.SecurityChecker; |
62 | 58 | import org.apache.cloudstack.affinity.AffinityGroupProcessor; |
|
844 | 840 | import com.cloud.utils.net.MacAddress; |
845 | 841 | import com.cloud.utils.net.NetUtils; |
846 | 842 | import com.cloud.utils.nio.TrustAllManager; |
| 843 | +import com.cloud.utils.security.CertificateHelper; |
847 | 844 | import com.cloud.utils.ssh.SSHKeysHelper; |
848 | 845 | import com.cloud.vm.ConsoleProxyVO; |
849 | 846 | import com.cloud.vm.DiskProfile; |
|
870 | 867 | import com.cloud.vm.dao.VMInstanceDao; |
871 | 868 | import com.fasterxml.jackson.databind.ObjectMapper; |
872 | 869 | import com.fasterxml.jackson.databind.JsonNode; |
| 870 | +import javax.naming.ConfigurationException; |
873 | 871 |
|
874 | 872 |
|
875 | 873 | public class ManagementServerImpl extends ManagerBase implements ManagementServer, Configurable { |
@@ -1257,7 +1255,7 @@ private void checkLicenseAndControlAgent(HostVO host) { |
1257 | 1255 |
|
1258 | 1256 | // 라이센스 상태 확인 |
1259 | 1257 | JsonNode licenseStatus = getLicenseStatus(licenseApiUrl, ipAddress); |
1260 | | - boolean isExpired = licenseStatus.get("expired").asBoolean(); |
| 1258 | + boolean isExpired = licenseStatus.get("expiry_date").asBoolean(); |
1261 | 1259 |
|
1262 | 1260 | // 라이센스 상태에 따라 에이전트 제어 |
1263 | 1261 | if (isExpired) { |
@@ -5940,8 +5938,8 @@ public LicenseCheckerResponse checkLicense(LicenseCheckCmd cmd) { |
5940 | 5938 | response.setSuccess(false); |
5941 | 5939 | response.setExpiryDate(null); |
5942 | 5940 | } else { |
5943 | | - boolean isExpired = jsonNode.get("expired").asBoolean(); |
5944 | | - String expiryDateStr = jsonNode.get("expiry_date").asText(); |
| 5941 | + boolean isExpired = jsonNode.get("expiry_date").asBoolean(); |
| 5942 | + String expiryDateStr = jsonNode.get("expired").asText(); |
5945 | 5943 |
|
5946 | 5944 | response.setSuccess(!isExpired); |
5947 | 5945 | response.setHasLicense(true); |
|
0 commit comments