def get_version(self):
        """Get the DCNM version."""

        url = '%s://%s/rest/dcnm-version' % (self.dcnm_protocol, self._ip)
        payload = {}

        try:
            res = self._send_request('GET', url, payload, 'dcnm-version')
            if res and res.status_code in self._resp_ok:
                return res.json().get('Dcnm-Version')
        except dexc.DfaClientRequestFailed as exc:
            LOG.error("Failed to get DCNM version.")
            sys.exit("ERROR: Failed to connect to DCNM: %s", exc)
Get the DCNM version.