diff --git a/vmware_nsx/nsxlib/v3/__init__.py b/vmware_nsx/nsxlib/v3/__init__.py index 56a2400e58..0453dbfc26 100644 --- a/vmware_nsx/nsxlib/v3/__init__.py +++ b/vmware_nsx/nsxlib/v3/__init__.py @@ -25,6 +25,12 @@ from vmware_nsx.nsxlib.v3 import client LOG = log.getLogger(__name__) +def get_version(): + node = client.get_resource("node") + version = node.get('node_version') + return version + + def get_edge_cluster(edge_cluster_uuid): resource = "edge-clusters/%s" % edge_cluster_uuid return client.get_resource(resource) diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 924eb0e1d6..c6410541ac 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -147,7 +147,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, def __init__(self): super(NsxV3Plugin, self).__init__() LOG.info(_LI("Starting NsxV3Plugin")) - + LOG.info(_LI("NSX Version: %s"), nsxlib.get_version()) self._api_cluster = nsx_cluster.NSXClusteredAPI() self._nsx_client = nsx_client.NSX3Client(self._api_cluster) nsx_client._set_default_api_cluster(self._api_cluster)