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:  

View workload and workload members

List all the workloads

The workloads resource returns a list of all workloads known to VMControl. Query parameters are available that allow you to filter workloads (based on name, description, or state) or return additional properties for each of the workloads with a single call. For more information on these query parameters, refer to the workloads resource page of the Systems Director 6.3.x SDK information center.

  • URL
    • https://myserver:port/ibm/director/rest/VMControl/workloads
  • HTTP method
    • GET
  • Sample request

    List all known workloads:

    GET https://myserver:port/ibm/director/rest/VMControl/workloads



    Listing 11. Sample response representation
            
    {
      "candidateServers": {"uri": "/ibm/director/rest/VMControl/workloads/
    						candidateServers"},
      "uri": "/ibm/director/rest/VMControl/workloads",
      "workloads": [
        {
          "name": "workload1",
          "properties": {},
          "uri": "/ibm/director/rest/VMControl/workloads/18994",
          "oid": 18994,
          "state": {
            "label": "Started",
            "id": 8
          }
        },
        {
          "name": "workload2",
          "properties": {},
          "uri": "/ibm/director/rest/VMControl/workloads/18995",
          "oid": 18995,
          "state": {
            "label": "Started",
            "id": 8
          }
        }
      ]
    }
    


View workload properties

The workload resource returns detailed information about the specified workload. The items in the properties JSON object are available to be returned for all workloads in the previous request using either the Props query for individual properties or the DefaultProps query to return everything in the properties JSON object.

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

    Retrieve the properties of a workload with a unique ID of 18994:

    GET https://myserver:port/ibm/director/rest/VMControl/workloads/18994



    Listing 12. Sample response representation
            
    {
      "oid": 18994,
      "detailedState": 0,
      "systemPools": {"uri": "/ibm/director/rest/VMControl/workloads/18994/systemPools"},
      "state": {
        "label": "Started",
        "id": 8
      },
      "approvalRequired": true,
      "uri": "/ibm/director/rest/VMControl/workloads/18994",
      "properties": {
        "Description": "First workload",
        "Vendor": {},
        "ApprovalRequired": true,
        "ChangedDate": 1341908501000,
        "Oid": 18994,
        "SpecificationVersion": 0,
        "Name": "workload1",
        "Info": {},
        "Resilient": false,
        "State": "Started"
      },
      "hosts": {"uri": "/ibm/director/rest/VMControl/workloads/18994/hosts"},
      "remoteRestart": false,
      "createdBy": "root",
      "specificationVersion": 0,
      "metrics": {"uri": "/ibm/director/rest/resources/WorkloadInstance/18994/
    				monitorviews/WORKLOAD_METRICS_GROUP_ID/monitordata"},
      "virtualServers": {"uri": "/ibm/director/rest/VMControl/workloads/18994/
    								virtualServers"},
      "description": "First workload",
      "changedDate": 1341908501000,
      "virtualServerCount": 1,
      "resilient": "None",
      "liveVirtualServerRelocation": false,
      "info": "UNDEFINED",
      "vendor": "UNDEFINED",
      "priority": 2,
      "name": "workload1"
    }
    


View workload members

A workload represents one or more virtual servers that can be monitored and managed as a single entity. Within the context of this tutorial, workloads will contain only a single virtual server, as that is the only result of the current deployment process. That makes this resource a little less interesting.

Manual workload creation, or the grouping of existing virtual servers, can result in a workload containing more than one member. The topic of manual workload creation is out of the scope of this tutorial. For more information on manual workload creation, refer to the workloads resource page of the Systems Director 6.3.x SDK information center.

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

    List the members of a workload with a unique ID of 18994:

    GET https://myserver:port/ibm/director/rest/VMControl/workloads/18994/virtualServers



    Listing 13. Sample response representation
            
    {
      "uri": "/ibm/director/rest/VMControl/workloads/18994/virtualServers",
      "virtualServers": [{
        "name": "ip10-32-41-98_rhel62_10g",
        "properties": {},
        "customization": {"uri": "/ibm/director/rest/VMControl/hosts/16223/virtualServers
    								/16220/customization"},
        "oid": 16220,
        "uri": "/ibm/director/rest/VMControl/hosts/16223/virtualServers/16220",
        "state": {
          "label": "Started",
          "id": 8
        }
      }]
    }
    

4 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