Intel AMT Features > Storage Administration and Operations > Use Cases > Storage: Register Application, Perform Task, Unregister Application
CollapseAll image

Storage: Register Application, Perform Task, Unregister Application

All storage applications have the same high-level flow: Register the application, perform the desired operations, and then unregister the application.

Registering the application returns a session handle, which must be used in almost all subsequent storage calls.  Additionally, many calls require the application handle of the current application. The first thing a management application should do after registering is retrieve the application handle for the current session. After performing the required storage operations, the application should perform an unregister operation in order to terminate its session with Intel AMT.

1.  Retrieve the instance of AMT_ThirdPartyDataStorageAdministrationService, where the “Name” key equals “Intel(r) AMT Third Party Data Storage Administration Service”.

2.  Register the application with Intel AMT by invoking AMT_ThirdPartyDataStorageService.RegisterApplication with the following input parameters:

Parameter

Description/Value

CallerUUID

The UUID to associate with this instance of the application. This should be a UINT8 string value of exactly 32 hexadeximal digits (16 bytes). NOTE: Applications should always use the same UUID every time they register; typically this is the UUID of the system on which the application is running.

ApplicationName

The Application Name. A string of up to 64 characters.

Vendorname

The Vendor Name. A string of up to 64 characters.

EnterpriseName

The Enterprise Name. A string of up to 64 characters.

 

The session handle is returned as an output parameter. 

 Note:

The session handle is returned as a string.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("RegisterApplication")

$inputObject.SetProperty("CallerUUID", "12098768569284567846853456789011")

$inputObject.SetProperty("VendorName", "VenIntel")

$inputObject.SetProperty("ApplicationName", "SampleApp")

$inputObject.SetProperty("EnterpriseName", "Intel")

$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue = $outputObject.GetProperty("ReturnValue")

if($returnValue -like "0")

{

    $sessionHandle = $outputObject.GetProperty("SessionHandle")

}

 

 

3.  Invoke AMT_ThirdPartyDataStorageService.GetCurrentApplicationHandle to retrieve the application handle.

   Pass the session handle as an input parameter.

   The application handle is returned as an output parameter.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("GetCurrentApplicationHandle")

# $sessionHandle is the session handle returned by 'RegisterApplication' method.

$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())

$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue = $outputObject.GetProperty("ReturnValue")

if($returnValue -like "0")

{

    $applicationHandle = $outputObject.GetProperty("ApplicationHandle")

}

 

 

4.  Perform any operations as needed and/or defined by subsequent use cases.

5.  Invoke AMT_ThirdPartyDataStorageService.UnregisterApplication to end the session. Pass it the session handle as an input parameter.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")

$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("UnregisterApplication")

# $sessionHandle is the session handle returned by 'RegisterApplication' method.

$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())

$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)

$returnValue = $outputObject.GetProperty("ReturnValue")

 

 

Additional Information     

   If the application being registered does not have a pre-existing FPACL entry, then Intel AMT creates a non-partner application with the given information.

   The session handle is passed and returned as a string, while all other handles are passed and returned as integers.

   It is possible to have multiple sessions open for different applications from the same management console.  As noted earlier, multiple sessions with the same application (including the UUID) are not allowed.

Instance Diagram

Not applicable

Classes Used in This Flow

SDK Sample

Located at:<SDK_root> \Windows\Intel_AMT\Samples\WS-Management\Storage

 

See Also:

   Storage Concepts and Objects

   Application Development Guidelines

   Examples of Using the Storage Feature

Copyright © 2006-2013, Intel Corporation. All rights reserved.