SoftwareComponent example using Python SDK

asked 2016-05-14 05:33:43 -0600

Sam Jay gravatar image

updated 2016-05-19 15:16:53 -0600


I want to write a functional python script that will utilize SoftwareComponent resource and demonstrate its functionality (e.g. using at least 2 lifecycle actions, maybe CREATE and UPDATE). I've thought of an example with installing MySQL server and creating a database within CREATE action, and maybe some kind of reconfiguration with database within UPDATE action (adding some new entries). Is it feasible?

I've found Python binding webpage and python-heatclient API v1, but I can not see SoftwareComponent resource in there, I only noticed SoftwareConfig.

Since I'm a novice at OpenStack, any help or advice is welcome and will be appreciated. Thank you in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-19 13:37:14 -0600

zaneb gravatar image

There's no SoftwareComponent ReST API because the OS::Heat::SoftwareComponent resource in Heat is implemented internally as a number of SoftwareConfigs.

edit flag offensive delete link more


Thanks for your reply zaneb. So, I'll have to use OS::Heat::SoftwareConfig instead? Is it even possible to write Python automation script that uses Heat resources or are only HOT templates used for that? I went through OpenStack Python SDK but couldn't find any examples that use Heat service.

Sam Jay gravatar imageSam Jay ( 2016-05-19 15:11:38 -0600 )edit

There is a ReST API for SoftwareConfig/SoftwareDeployment, and you can use it independently of a stack. The python-heatclient library has support for it; I'm not sure about the OpenStack SDK though.

zaneb gravatar imagezaneb ( 2016-05-20 09:12:31 -0600 )edit

Are you referring to (this)? I wonder if it is possible to do it using (Python SDK), similar to those examples shown within "Networking", "Compute" etc., or at least call .yaml from py

Sam Jay gravatar imageSam Jay ( 2016-05-20 16:02:10 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-05-13 18:42:23 -0600

Seen: 209 times

Last updated: May 19 '16