Search code examples
ibm-cloud-infrastructure

ImageTemplateId for OSReload in SL


I'm implementing OSreload with java client.

Guest.Service gService = Guest.service(client, 22075687L);
Configuration config = new Configuration();
config.setImageTemplateId(imageTemplateId); // imageTemplateId??
gService.reloadOperatingSystem("FORCE", config);

How can I get a ImageTemplate ID? To select OS, I am using "packageService" to get a price and OS description, but I can't find its imageTemplate Id.

OSReload


Solution

  • There are two options to do an OS reload, you can use an image template or priceId. In the screen that you showed, Control Portal uses a price (These are items offered by SoftLayer), so it doesn't have an ImageTemplateId