Bug 840221 - Need more explanation about the application blueprint's "return" element.
Need more explanation about the application blueprint's "return" element.
Status: CLOSED CURRENTRELEASE
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: Docs User Guide (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity medium
: beta6
: ---
Assigned To: Dan Macpherson
Rehana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-14 08:34 EDT by Etsuji Nakai
Modified: 2012-12-10 16:54 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-10 16:54:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Etsuji Nakai 2012-07-14 08:34:47 EDT
In Appendix B of the Cloud Engine User Guide(Revision 0-53), the description of the "return" element in application blueprint XML is very unclear.

---
B.15. return
The return element is a single parameter value that an application service provides. Other assemblies utilize these return parameters for use in their own executable scripts. 
---

I couldn't see what parameters can be actually used. So, I looked into the codes and found that it internally uses Ruby's facter module. So the element such as <return name="hostname"/> provides what you can see in the following command (supposing that you installed the facter RPM package.)

# facter hostname

This should be exlained in the user guide.

And if my understanding is correct, the following description in "Procedure 7.3. Editing an Application Blueprint" is incorrect because facter doesn't have a parameter like "hostname-1", and it's not a return value of the executable script.

---
Define the return values (returns) for the service's executable script.

<deployable name="Application">
  <description>An example application</description>
  <assemblies>
    <assembly name="instance-1" hwp="hwp1">
      <image id="beedb0f9-ca05-46a1-bcbb-704887752d8e"/>
      <services>
        ...
      </services>
      <returns>
        <return name="hostname-1"/>
      </returns>
    </assembly>
    ...
  </assemblies>
</deployable>

This example contains a single return value called hostname-1. The application blueprint uses return value for other service parameters in other instances. 
---
Comment 2 Dan Macpherson 2012-09-09 14:02:20 EDT
(In reply to comment #0)
> In Appendix B of the Cloud Engine User Guide(Revision 0-53), the description
> of the "return" element in application blueprint XML is very unclear.
> 
> ---
> B.15. return
> The return element is a single parameter value that an application service
> provides. Other assemblies utilize these return parameters for use in their
> own executable scripts. 
> ---
> 
> I couldn't see what parameters can be actually used. So, I looked into the
> codes and found that it internally uses Ruby's facter module. 

Added the following paragraph to <return> element section:

The return element uses variables from the Facter Ruby library. For more information, read the full specification of Facter variables on the Facter Documentation website [1].

[1] Facter Documentation - http://docs.puppetlabs.com/facter/


> 
> And if my understanding is correct, the following description in "Procedure
> 7.3. Editing an Application Blueprint" is incorrect because facter doesn't
> have a parameter like "hostname-1", and it's not a return value of the
> executable script.
> 
> ---
> Define the return values (returns) for the service's executable script.
> 
> <deployable name="Application">
>   <description>An example application</description>
>   <assemblies>
>     <assembly name="instance-1" hwp="hwp1">
>       <image id="beedb0f9-ca05-46a1-bcbb-704887752d8e"/>
>       <services>
>         ...
>       </services>
>       <returns>
>         <return name="hostname-1"/>
>       </returns>
>     </assembly>
>     ...
>   </assemblies>
> </deployable>
> 
> This example contains a single return value called hostname-1. The
> application blueprint uses return value for other service parameters in
> other instances. 
> ---

Corrected Application Blueprint section to use the correct "hostname" variable from Facter.
Comment 4 Lana Brindley 2012-11-18 21:45:38 EST
This documentation has now been dropped to translation ahead of publication. For any further issues, please open a new a bug.

LKB
Comment 5 Lana Brindley 2012-12-10 16:54:02 EST
This document is now publicly available on access.redhat.com. For any further issues, please raise a new bug.

LKB

Note You need to log in before you can comment on or make changes to this bug.