Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

developerWorks Community:

  • Close [x]

IBM Systems Director VMControl resource lifecycle management: part 3

Remote image deployment lifecycle management using the VMControl REST APIs

Piyush Jain (piyushjain@in.ibm.com), Staff Software Engineer, IBM  
author photo
Piyush Jain is a Staff Software Engineer at IBM currently working on VMControl under IBM Systems Director, a critical product in IBM's product portfolio. He has an overall experience of around 6 years and holds a bachelor's degree in Information Technology Engineering from IET Alwar, Rajasthan India. You can contact him at piyushjain@in.ibm.com
(An IBM developerWorks Contributing Author)
Nicholas Schambureck (nschambu@us.ibm.com), Advisory Software Engineer, IBM
Photo of Nick
Nick Schambureck is an Advisory Software Engineer and Team Leader for the IBM Systems Director VMControl command-line interface and REST API team. He has been working with the project since its inception.
Poornima Soundararajan (poornima.s@in.ibm.com), Staff Software Engineer, IBM
Photo of Poornima
Poornima Soundararajan is working as a Staff Software Engineer for the IBM Systems Director VMControl advanced manager. Poornima has more than 7 years of experience in Java/J2EE technologies.
Aparna Khare (apakhare@in.ibm.com), System Software Engineer, IBM
Photo of Aparna
Aparna Khare is working as a System Software Engineer for the IBM Systems Director VMControl advanced manager. Aparna has 4 years of experience in Java/J2EE technologies.

Summary:  IBM® Systems Director is a platform management solution that is used to manage physical and virtual systems in a multisystem environment. It supports various virtualization technologies and multiple operating systems across IBM and non-IBM platforms. IBM Systems Director VMControl™ is an advanced manager of IBM Systems Director, a free-to-own set of platform management tools. This tutorial is part of a series on VMControl resource lifecycle management. This tutorial explains the image deployment lifecycle using the VMControl Representational State Transfer (REST) application programming interfaces (APIs).

View more content in this series

Date:  29 Jan 2013
Level:  Intermediate PDF:  A4 and Letter (415 KB | 22 pages)Get Adobe® Reader®

Activity:  18998 views
Comments:  

Modify a workload

This next section describes about updating an existing workload. Workload updates are simple property updates, such as: name, description, state, and, if the workload was created through the deploy to server system pool, a number of properties dealing with high availability and resiliency of the workload.

Depending on the operation, the modify workload task can be a synchronous or an asynchronous operation. Property changes are synchronous while state changes are asynchronous.

Successful running of the request will respond with a HTTP status code of 200 (OK) for a property change or 202 (Accepted) for a state change. In the case of the 202 (Accepted) status code, the Location HTTP header will include the Uniform Resource Identifier (URI) of the job that was created for this action.

There are two examples given below. The first example shows a property change and the second example shows a state change.

  • URL
    • https://myserver:port/ibm/director/rest/VMControl/workloads/{workloadOID}
  • HTTP method
    • PUT
  • Sample request 1

    Modify the name of the workload with a unique ID of 6798:

    PUT https://myserver:port/ibm/director/rest/VMControl/workloads/6798



    Listing 14. Sample request representation
            
    {
        "workload": {
            "name": "myUpdatedWorkload"
        }
    }
    



    Listing 15. Sample response
            
    HTTP/1.1 200 OK
    Cache-Control: no-store
    Set-Cookie: JSESSIONID_ibm_console_80=0000pF3CdRrz4WwSv4LsNiwI4jJ;Path=/; Secure; 
    							HTTPOnly
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 97
    Date: Tue, 10 Jul 2012 08:50:33 GMT
    Accept-Ranges: bytes
    Server: Noelios-Restlet-Engine/1.1.4
    Content-Language: en-US
    
    {
      "MessageText": "DNZEMW308I The workload update completed successfully.",
      "MessageID": "DNZEMW308I"
    }
    

  • Sample request 2

    Modify the state of the workload with a unique ID of 6798:

    PUT https://myserver:port/ibm/director/rest/VMControl/workloads/6798



    Listing 16. Sample request representation
            
    {
        "workload": {
            "state": 5
        }
    }
    



    Listing 17. Sample response
            
    HTTP/1.1 202 OK
    Cache-Control: no-store
    Set-Cookie: JSESSIONID_ibm_console_80=0000xxKiy8AAgbCQUgRuA5bQvDk;Path=/; Secure; 
    							HTTPOnly
    Expires: Thu, 01 Dec 1994 16:00:00 GMT
    Content-Type: application/json; charset=UTF-8
    Content-Length: 216
    Date: Fri, 20 Jul 2012 18:42:02 GMT
    Location: https://9.12.183.62:8422/ibm/director/rest/jobs/224/activations/1
    Accept-Ranges: bytes
    Server: Noelios-Restlet-Engine/1.1.4
    Content-Language: en-US
    
    {
      "MessageText": "DNZEMW307I New job activation for updating the workload was 
    	started.\nRefer to the following URI for job activation status: 
    	/ibm/director/rest/jobs/224/activations/1 ",
      "MessageID": "DNZEMW307I"
    }
    

Monitor the modify workload job

The final step in modifying a workload is to monitor its progress to completion. The recommended method to monitor the modify workload job is through the job activation record. As shown above, this URL is returned in the response from the PUT request. The job activation record can be monitored by polling the URL, but the recommended method is to use the JMS provider.

IBM Systems Director server includes a JMS provider to communicate events and other important messages with interested client applications. It allows for asynchronous communication between two or more applications. Job activation records can be monitored asynchronously through the Director.jobs.activation JMS topic.

For more information on JMS, refer to the JMS Messaging Overview page of the IBM Systems Director 6.3.x SDK information center.

5 of 8 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX, Linux
ArticleID=855728
TutorialTitle=IBM Systems Director VMControl resource lifecycle management: part 3
publish-date=01292013
author1-email=piyushjain@in.ibm.com
author1-email-cc=nissler@us.ibm.com
author2-email=nschambu@us.ibm.com
author2-email-cc=
author3-email=poornima.s@in.ibm.com
author3-email-cc=nissler@us.ibm.com
author4-email=apakhare@in.ibm.com
author4-email-cc=nissler@us.ibm.com