Ask Your Question
0

SoftwareComponent example using Python SDK

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

Sam Jay gravatar image

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

Hello,

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
0

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

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

Comments

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 -0500 )edit
1

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 -0500 )edit

Are you referring to https://developer.openstack.org/api-ref-orchestration-v1.html (this)? I wonder if it is possible to do it using http://docs.openstack.org/user-guide/sdk.html (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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 172 times

Last updated: May 19 '16