Set the extension key
Every extension that you register with
vCenter Server
must have a unique extension key that vCenter Server
uses to identify the extension.To ensure uniqueness, you can use the Java package-naming convention for the key value, for example
com.yourcompany.yourextension
. Your solution can set the extension key by defining the extensionKey=com.mycompany.mysolution
property in the mysolution.properties
file. The MyManager.java
class picks up this property by calling the Extension.setKey()
method.If you change the extension key in the
extensionKey
property in mysolution.properties
, you can see the changed name in the vSphere Client
.You can see the extensions that you register with
ExtensionManager
in the vCenter Managed Object Browser at https://
<vcenter_server_ip_address>
/mob/?moid=ExtensionManager- Call theExtension.setKey()method to set the extension key.MyManager.javasets the extension key to theextensionKeyvariable that themysolution.propertiesfile defines.public class MyManager implements InitializingBean { [...] public final String EXTENSION_KEY; [...] EXTENSION_KEY = extensionKey; [...] } [...] private Extension createExtensionObject() { Extension extension = new Extension(); extension.setKey(EXTENSION_KEY); [...] }
You set the extension key for an extension.
Provide information about the extension to
vCenter Server
.