Microsoft Virtualization Discussions

Getting Job ID from c-mode asyncronous commands

yakobi
2,979 Views

Hi,

Several c-mode commands (available in 1.6 beta) such as New-NcAggr don't complete immediately, instead they result with an asynchronous job.

Is there a way to get the job ID so it can be used with the Get-NcJob command? (I tried $a=New-NcAggr... but $a contained the aggregate details and no information on the job).

Thanks,

M.

1 ACCEPTED SOLUTION

cknight
2,978 Views

As Michael points out, Toolkit 1.6 does include a number (148, to be exact) of Cluster-mode cmdlets.  There aren't that many asynchronous APIs in Data ONTAP 8.1 (Cluster-mode), but we expect that to change over time.  Those we support with cmdlets do indeed return job ID info, suitable for passing to Get-NcJob.  Here's an example:

PS C:\> Start-NcVolMove bigvol aggr1 -Vserver vserver1 | Get-NcJob | fl *

NcController            : 10.61.172.155

IsRestarted             : False

JobAffinity             : cluster

JobCategory             : VOPL

JobCompletion           :

JobDescription          : Move "bigvol" in Vserver "vserver1" to aggregate"aggr1"

JobDropdeadTime         :

JobDropdeadTimeDT       :

JobEndTime              :

JobEndTimeDT            :

JobId                   : 2267

JobName                 : Volume Move

JobNode                 : fas3070cluster01-02

JobPriority             : high

JobProcess              : mgwd

JobProgress             : Volume move job in setup

JobQueueTime            : 1319639018

JobQueueTimeDT          : 10/26/2011 2:23:38 PM

JobSchedule             : @now

JobStartTime            : 1319639091

JobStartTimeDT          : 10/26/2011 2:24:51 PM

JobState                : running

JobStatusCode           : 0

JobType                 : MOVE

JobUsername             : admin

JobUuid                 : 18fdbb2b-ffde-11e0-be49-123478563412

JobVserver              : fas3070cluster01

IsRestartedSpecified    : True

JobDropdeadTimeSpecified: False

JobEndTimeSpecified     : False

JobIdSpecified          : True

JobQueueTimeSpecified   : True

JobStartTimeSpecified   : True

JobStatusCodeSpecified  : True

View solution in original post

1 REPLY 1

cknight
2,979 Views

As Michael points out, Toolkit 1.6 does include a number (148, to be exact) of Cluster-mode cmdlets.  There aren't that many asynchronous APIs in Data ONTAP 8.1 (Cluster-mode), but we expect that to change over time.  Those we support with cmdlets do indeed return job ID info, suitable for passing to Get-NcJob.  Here's an example:

PS C:\> Start-NcVolMove bigvol aggr1 -Vserver vserver1 | Get-NcJob | fl *

NcController            : 10.61.172.155

IsRestarted             : False

JobAffinity             : cluster

JobCategory             : VOPL

JobCompletion           :

JobDescription          : Move "bigvol" in Vserver "vserver1" to aggregate"aggr1"

JobDropdeadTime         :

JobDropdeadTimeDT       :

JobEndTime              :

JobEndTimeDT            :

JobId                   : 2267

JobName                 : Volume Move

JobNode                 : fas3070cluster01-02

JobPriority             : high

JobProcess              : mgwd

JobProgress             : Volume move job in setup

JobQueueTime            : 1319639018

JobQueueTimeDT          : 10/26/2011 2:23:38 PM

JobSchedule             : @now

JobStartTime            : 1319639091

JobStartTimeDT          : 10/26/2011 2:24:51 PM

JobState                : running

JobStatusCode           : 0

JobType                 : MOVE

JobUsername             : admin

JobUuid                 : 18fdbb2b-ffde-11e0-be49-123478563412

JobVserver              : fas3070cluster01

IsRestartedSpecified    : True

JobDropdeadTimeSpecified: False

JobEndTimeSpecified     : False

JobIdSpecified          : True

JobQueueTimeSpecified   : True

JobStartTimeSpecified   : True

JobStatusCodeSpecified  : True

Public