|
30 | 30 | import org.apache.cloudstack.backup.BackupRepositoryService; |
31 | 31 | import org.apache.cloudstack.config.Configuration; |
32 | 32 | import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet; |
| 33 | +import org.apache.cloudstack.dns.DnsRecord; |
| 34 | +import org.apache.cloudstack.dns.DnsServer; |
| 35 | +import org.apache.cloudstack.dns.DnsZone; |
33 | 36 | import org.apache.cloudstack.extension.Extension; |
34 | 37 | import org.apache.cloudstack.extension.ExtensionCustomAction; |
35 | 38 | import org.apache.cloudstack.gpu.GpuCard; |
36 | 39 | import org.apache.cloudstack.gpu.GpuDevice; |
37 | 40 | import org.apache.cloudstack.gpu.VgpuProfile; |
38 | 41 | import org.apache.cloudstack.ha.HAConfig; |
| 42 | +import org.apache.cloudstack.kms.HSMProfile; |
| 43 | +import org.apache.cloudstack.kms.KMSKey; |
39 | 44 | import org.apache.cloudstack.network.BgpPeer; |
40 | 45 | import org.apache.cloudstack.network.Ipv4GuestSubnetNetworkMap; |
41 | 46 | import org.apache.cloudstack.quota.QuotaTariff; |
@@ -272,6 +277,20 @@ public class EventTypes { |
272 | 277 | public static final String EVENT_CA_CERTIFICATE_REVOKE = "CA.CERTIFICATE.REVOKE"; |
273 | 278 | public static final String EVENT_CA_CERTIFICATE_PROVISION = "CA.CERTIFICATE.PROVISION"; |
274 | 279 |
|
| 280 | + // KMS (Key Management Service) events |
| 281 | + public static final String EVENT_KMS_KEY_WRAP = "KMS.KEY.WRAP"; |
| 282 | + public static final String EVENT_KMS_KEY_UNWRAP = "KMS.KEY.UNWRAP"; |
| 283 | + public static final String EVENT_KMS_KEY_CREATE = "KMS.KEY.CREATE"; |
| 284 | + public static final String EVENT_KMS_KEY_UPDATE = "KMS.KEY.UPDATE"; |
| 285 | + public static final String EVENT_KMS_KEY_ROTATE = "KMS.KEY.ROTATE"; |
| 286 | + public static final String EVENT_KMS_KEY_DELETE = "KMS.KEY.DELETE"; |
| 287 | + public static final String EVENT_VOLUME_MIGRATE_TO_KMS = "VOLUME.MIGRATE.TO.KMS"; |
| 288 | + |
| 289 | + // HSM Profile events |
| 290 | + public static final String EVENT_HSM_PROFILE_CREATE = "HSM.PROFILE.CREATE"; |
| 291 | + public static final String EVENT_HSM_PROFILE_UPDATE = "HSM.PROFILE.UPDATE"; |
| 292 | + public static final String EVENT_HSM_PROFILE_DELETE = "HSM.PROFILE.DELETE"; |
| 293 | + |
275 | 294 | // Account events |
276 | 295 | public static final String EVENT_ACCOUNT_ENABLE = "ACCOUNT.ENABLE"; |
277 | 296 | public static final String EVENT_ACCOUNT_DISABLE = "ACCOUNT.DISABLE"; |
@@ -867,6 +886,17 @@ public class EventTypes { |
867 | 886 | public static final String EVENT_BACKUP_REPOSITORY_ADD = "BACKUP.REPOSITORY.ADD"; |
868 | 887 | public static final String EVENT_BACKUP_REPOSITORY_UPDATE = "BACKUP.REPOSITORY.UPDATE"; |
869 | 888 |
|
| 889 | + // DNS Framework Events |
| 890 | + public static final String EVENT_DNS_SERVER_ADD = "DNS.SERVER.ADD"; |
| 891 | + public static final String EVENT_DNS_SERVER_UPDATE = "DNS.SERVER.UPDATE"; |
| 892 | + public static final String EVENT_DNS_SERVER_DELETE = "DNS.SERVER.DELETE"; |
| 893 | + public static final String EVENT_DNS_ZONE_CREATE = "DNS.ZONE.CREATE"; |
| 894 | + public static final String EVENT_DNS_ZONE_UPDATE = "DNS.ZONE.UPDATE"; |
| 895 | + public static final String EVENT_DNS_ZONE_DELETE = "DNS.ZONE.DELETE"; |
| 896 | + public static final String EVENT_DNS_RECORD_CREATE = "DNS.RECORD.CREATE"; |
| 897 | + public static final String EVENT_DNS_RECORD_DELETE = "DNS.RECORD.DELETE"; |
| 898 | + public static final String EVENT_DNS_NAME_COLLISION = "DNS.NAME.COLLISION"; |
| 899 | + |
870 | 900 | static { |
871 | 901 |
|
872 | 902 | // TODO: need a way to force author adding event types to declare the entity details as well, with out braking |
@@ -1020,6 +1050,20 @@ public class EventTypes { |
1020 | 1050 | entityEventDetails.put(EVENT_VOLUME_RECOVER, Volume.class); |
1021 | 1051 | entityEventDetails.put(EVENT_VOLUME_CHANGE_DISK_OFFERING, Volume.class); |
1022 | 1052 |
|
| 1053 | + // KMS Key Events |
| 1054 | + entityEventDetails.put(EVENT_KMS_KEY_CREATE, KMSKey.class); |
| 1055 | + entityEventDetails.put(EVENT_KMS_KEY_UPDATE, KMSKey.class); |
| 1056 | + entityEventDetails.put(EVENT_KMS_KEY_UNWRAP, KMSKey.class); |
| 1057 | + entityEventDetails.put(EVENT_KMS_KEY_WRAP, KMSKey.class); |
| 1058 | + entityEventDetails.put(EVENT_KMS_KEY_DELETE, KMSKey.class); |
| 1059 | + entityEventDetails.put(EVENT_KMS_KEY_ROTATE, KMSKey.class); |
| 1060 | + entityEventDetails.put(EVENT_VOLUME_MIGRATE_TO_KMS, KMSKey.class); |
| 1061 | + |
| 1062 | + // HSM Profile Events |
| 1063 | + entityEventDetails.put(EVENT_HSM_PROFILE_CREATE, HSMProfile.class); |
| 1064 | + entityEventDetails.put(EVENT_HSM_PROFILE_UPDATE, HSMProfile.class); |
| 1065 | + entityEventDetails.put(EVENT_HSM_PROFILE_DELETE, HSMProfile.class); |
| 1066 | + |
1023 | 1067 | // Domains |
1024 | 1068 | entityEventDetails.put(EVENT_DOMAIN_CREATE, Domain.class); |
1025 | 1069 | entityEventDetails.put(EVENT_DOMAIN_DELETE, Domain.class); |
@@ -1411,6 +1455,17 @@ public class EventTypes { |
1411 | 1455 | // Backup Repository |
1412 | 1456 | entityEventDetails.put(EVENT_BACKUP_REPOSITORY_ADD, BackupRepositoryService.class); |
1413 | 1457 | entityEventDetails.put(EVENT_BACKUP_REPOSITORY_UPDATE, BackupRepositoryService.class); |
| 1458 | + |
| 1459 | + // DNS Framework Events |
| 1460 | + entityEventDetails.put(EVENT_DNS_SERVER_ADD, DnsServer.class); |
| 1461 | + entityEventDetails.put(EVENT_DNS_SERVER_UPDATE, DnsServer.class); |
| 1462 | + entityEventDetails.put(EVENT_DNS_SERVER_DELETE, DnsServer.class); |
| 1463 | + entityEventDetails.put(EVENT_DNS_ZONE_CREATE, DnsZone.class); |
| 1464 | + entityEventDetails.put(EVENT_DNS_ZONE_UPDATE, DnsZone.class); |
| 1465 | + entityEventDetails.put(EVENT_DNS_ZONE_DELETE, DnsZone.class); |
| 1466 | + entityEventDetails.put(EVENT_DNS_RECORD_CREATE, DnsRecord.class); |
| 1467 | + entityEventDetails.put(EVENT_DNS_RECORD_DELETE, DnsRecord.class); |
| 1468 | + |
1414 | 1469 | } |
1415 | 1470 |
|
1416 | 1471 | public static boolean isNetworkEvent(String eventType) { |
|
0 commit comments