Quantcast
Viewing all articles
Browse latest Browse all 20616

Need to get the latest Config from the SDK

I am having issues trying to craft a query to get the latest config for a device from the SDK (The work below is SQL, but I will covert it later once I have the data I need). It would be nice to pull a reference of the last config download time from the node properties and I thought this would be the "LastTransferDate", but it appears that it is not the case. Is there any meta data to that will give me the latest download time so I can join the tables and get one config? What does the lastTransferTime represent?

 

Here is the test query:

SELECTTOP 1

   CA.Config

   ,CA.DownloadTime

   ,CN.LastTransferDate

   NCM_ConfigArchiveCA

INNERJOIN

   NCM_NodePropertiesCN

ON

   CA.NodeID=CN.NodeID

INNERJOIN

   NodesN

ON

   CN.CoreNodeID=N.NodeID

   N.Caption='NodeNmae'

ORDERBY

   CA.DownloadTimeDESC


Results:

Config                                                   DownloadTime                   LastTransferDate
!Command: show running-config  |  2014-10-21 02:30:53.000  |  2014-10-27 17:35:02.097

 

I would like to do something like this:

 

SELECT

    CA.Config

FROM

    NCM_ConfigArchiveCA

INNERJOIN

    NCM_NodePropertiesCN

  ON

    CA.NodeID=CN.NodeID

INNERJOIN

    NodesN

  ON

    CN.CoreNodeID=N.NodeID

WHERE

    N.Caption='NodeName'

  AND

    CN.LastTransferDate=CA.DownloadTime


Viewing all articles
Browse latest Browse all 20616

Trending Articles