All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xlcloud.openstack.model.heat.StackData Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.xlcloud.openstack.model.heat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonRootName;

/**
 * Class representing stack details returned by heat.
 * @author Ksiazczyk Grzegorz, AMG.net
 */
@XmlRootElement( name = "stack" )
@XmlAccessorType( XmlAccessType.NONE )
@JsonRootName( "stack" )
public class StackData implements Serializable {

//[v1]  
//XML: 
//     TrueAWS CloudFormation Sample Template
//     WordPress_Single_Instance: Word
//     Press is web software you can use to create a beautiful
//     website or blog. This template installs a single-insta
//     nce WordPress deployment using a local MySQL database t
//     o store the data.
//     {"AWS::StackName": "wordpress_test_1351874562468", "KeyName": "ubuntu_key", "AWS::Region": "ap-southeast-1", "InstanceType": "m1.tiny", "LinuxDistribution": "CentOS"}
//     Stack creation started
//     wordpress_test_1351874562468
//     2012-11-02T16:43:42Z
//     
//     
//     http://localhost:8004/v1/admin/stacks/wordpress_test_1351874562468/4
//     50
//     CREATE_IN_PROGRESS
//     2012-11-02T16:43:43Z
//     AWS
//     CloudFormation Sample Template WordPress_Single_Instanc
//     e: WordPress is web software you can use to create a be
//     autiful website or blog. This template installs a singl
//     e-instance WordPress deployment using a local MySQL dat
//     abase to store the data.

    //[v2]  
    //JSON: 
    //{"stack": {"disable_rollback": true, "description": "Full HPC cluster template for XLcloud.", "parameters": {"CpuInstancesCount": "1", "GpuInstanceType": "m1.tiny", "LdapIp": "10.0.0.1", "VcTenantName": "test_hpc@test", "CpuInstanceType": "m1.small", "KeyName": "TODO", "AWS::StackName": "test_hpc@test", "VolumeSize": "1", "VncServerPassword": "password", "GlassfishAdminPassword": "password", "AWS::Region": "ap-southeast-1", "GpuInstancesCount": "1"}, "stack_status_reason": "Stack creation started", "stack_name": "test_hpc@test", "creation_time": "2012-12-10T11:45:30Z", "links": [{"href": "http://10.197.217.19:8004/v1/70bf3a452bc74bc894220d341e66bd8e/stacks/test_hpc%40test/cce55279-fa32-47cf-a16c-c4c5660da60d", "rel": "self"}], "capabilities": [], "notification_topics": [], "timeout_mins": 50, "stack_status": "CREATE_IN_PROGRESS", "updated_time": "2012-12-10T11:45:30Z", "id": "cce55279-fa32-47cf-a16c-c4c5660da60d", "template_description": "Full HPC cluster template for XLcloud."}}
    
    //[v3]
    //JSON:
    //{"stack": {"disable_rollback": true, "description": "AWS CloudFormation Sample Template WordPress_Multi_Instance: WordPress is web software you can use to create a beautiful website or blog. This template installs two instances: one running a WordPress deployment and theother using a local MySQL database to store the data.", "parameters": {"DBUsername": "******", "LinuxDistribution": "F16", "InstanceType": "m1.large", "DBRootPassword": "******", "AWS::StackName": "stasiakVC2@test", "KeyName": "key", "DBPassword": "******", "AWS::Region": "ap-southeast-1", "DBName": "wordpress"}, "stack_status_reason": "Stack successfully created", "stack_name": "stasiakVC2@test", "outputs": [{"output_value": "http://172.16.1.12/wordpress", "description": "URL for Wordpress wiki", "output_key": "WebsiteURL"}, {"output_value": "10.197.217.134", "description": "No description given", "output_key": "InstanceIPAddress"}], "creation_time": "2012-12-10T14:56:08Z", "links": [{"href": "http://10.197.217.19:8004/v1/4dc1cf58f12e474984c71fd93a45b92f/stacks/stasiakVC2%40test/b4807acf-2fac-439b-a6 3f-bec300fe5960", "rel": "self"}], "capabilities": [], "notification_topics": [], "timeout_mins": 50, "stack_status": "CREATE_COMPLETE", "updated_time": "2012-12-10T14:56:22Z", "id": "b4807acf-2fac-439b-a63f-bec300fe5960", "template_description": "AWS CloudFormation Sample Template WordPress_Multi_Instance: WordPress is web software you can use to create a beautiful website or blog. This template installs two instances: one running a WordPress deployment and the other using a local MySQL database to store the data."}}
    
    private static final long serialVersionUID = -8803419877251877531L;

    @XmlElement
    private String id;
    @XmlElement
    private Object capabilities;
    @XmlElement
    private Object notification_topics;
    @XmlElement
    private List outputs;
    
    //FIXME: it should be List but we don't need it at now
    @XmlElement
    private Object links;
//-- 
    @XmlElement
    private boolean disable_rollback;
    @XmlElement
    private String description;

    //FIXME: it should be Map but we don't need it at now
    @XmlElement
    private Object parameters;
    @XmlElement
    private String stack_status_reason;
    @XmlElement
    private String stack_name;
    @XmlElement
    private Date creation_time;
    @XmlElement
    private String URL;
    @XmlElement
    private Integer timeout_mins;
    @XmlElement
    private StackStatus stack_status;
    @XmlElement
    private Date updated_time;
    @XmlElement
    private String template_description;

    /**
     * Gets the value of {@link #disable_rollback}.
     * 
     * @return value of {@link #disable_rollback}
     */
    public boolean getDisable_rollback() {
        return disable_rollback;
    }

    /**
     * Sets the value of {@link #disable_rollback}.
     * 
     * @param disable_rollback
     *            - value
     */
    public void setDisable_rollback(boolean disable_rollback) {
        this.disable_rollback = disable_rollback;
    }

    /**
     * Gets the value of {@link #description}.
     * 
     * @return value of {@link #description}
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the value of {@link #description}.
     * 
     * @param description
     *            - value
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Gets the value of {@link #parameters}.
     * 
     * @return value of {@link #parameters}
     */
    public Object getParameters() {
        return parameters;
    }

    /**
     * Sets the value of {@link #parameters}.
     * 
     * @param parameters
     *            - value
     */
    public void setParameters(Object parameters) {
        this.parameters = parameters;
    }

    /**
     * Gets the value of {@link #stack_status_reason}.
     * 
     * @return value of {@link #stack_status_reason}
     */
    public String getStack_status_reason() {
        return stack_status_reason;
    }

    /**
     * Sets the value of {@link #stack_status_reason}.
     * 
     * @param stack_status_reason
     *            - value
     */
    public void setStack_status_reason(String stack_status_reason) {
        this.stack_status_reason = stack_status_reason;
    }

    /**
     * Gets the value of {@link #stack_name}.
     * 
     * @return value of {@link #stack_name}
     */
    public String getStack_name() {
        return stack_name;
    }

    /**
     * Sets the value of {@link #stack_name}.
     * 
     * @param stack_name
     *            - value
     */
    public void setStack_name(String stack_name) {
        this.stack_name = stack_name;
    }

    /**
     * Gets the value of {@link #creation_time}.
     * 
     * @return value of {@link #creation_time}
     */
    public Date getCreation_time() {
        return creation_time;
    }

    /**
     * Sets the value of {@link #creation_time}.
     * 
     * @param creation_time
     *            - value
     */
    public void setCreation_time(Date creation_time) {
        this.creation_time = creation_time;
    }

    /**
     * Gets the value of {@link #uRL}.
     * 
     * @return value of {@link #uRL}
     */
    public String getURL() {
        return URL;
    }

    /**
     * Sets the value of {@link #uRL}.
     * 
     * @param uRL
     *            - value
     */
    public void setURL(String uRL) {
        URL = uRL;
    }

    /**
     * Gets the value of {@link #timeout_mins}.
     * 
     * @return value of {@link #timeout_mins}
     */
    public Integer getTimeout_mins() {
        return timeout_mins;
    }

    /**
     * Sets the value of {@link #timeout_mins}.
     * 
     * @param timeout_mins
     *            - value
     */
    public void setTimeout_mins(Integer timeout_mins) {
        this.timeout_mins = timeout_mins;
    }

    /**
     * Gets the value of {@link #stack_status}.
     * 
     * @return value of {@link #stack_status}
     */
    public StackStatus getStack_status() {
        return stack_status;
    }

    /**
     * Sets the value of {@link #stack_status}.
     * 
     * @param stack_status
     *            - value
     */
    public void setStack_status(StackStatus stack_status) {
        this.stack_status = stack_status;
    }

    /**
     * Gets the value of {@link #updated_time}.
     * 
     * @return value of {@link #updated_time}
     */
    public Date getUpdated_time() {
        return updated_time;
    }

    /**
     * Sets the value of {@link #updated_time}.
     * 
     * @param updated_time
     *            - value
     */
    public void setUpdated_time(Date updated_time) {
        this.updated_time = updated_time;
    }

    /**
     * Gets the value of {@link #template_description}.
     * 
     * @return value of {@link #template_description}
     */
    public String getTemplate_description() {
        return template_description;
    }

    /**
     * Sets the value of {@link #template_description}.
     * 
     * @param template_description
     *            - value
     */
    public void setTemplate_description(String template_description) {
        this.template_description = template_description;
    }

    /**
     * Gets the value of {@link #id}.
     * @return value of {@link #id}
     */
    public String getId() {
        return id;
    }

    
    /**
     * Sets the value of {@link #id}.
     * @param id - value
     */
    public void setId(String id) {
        this.id = id;
    }

    
    /**
     * Gets the value of {@link #capabilities}.
     * @return value of {@link #capabilities}
     */
    public Object getCapabilities() {
        return capabilities;
    }

    
    /**
     * Sets the value of {@link #capabilities}.
     * @param capabilities - value
     */
    public void setCapabilities(Object capabilities) {
        this.capabilities = capabilities;
    }

    
    /**
     * Gets the value of {@link #notification_topics}.
     * @return value of {@link #notification_topics}
     */
    public Object getNotification_topics() {
        return notification_topics;
    }

    
    /**
     * Sets the value of {@link #notification_topics}.
     * @param notification_topics - value
     */
    public void setNotification_topics(Object notification_topics) {
        this.notification_topics = notification_topics;
    }

    
    /**
     * Gets the value of {@link #links}.
     * @return value of {@link #links}
     */
    public Object getLinks() {
        return links;
    }

    
    /**
     * Sets the value of {@link #links}.
     * @param links - value
     */
    public void setLinks(Object links) {
        this.links = links;
    }

    /**
     * Gets the value of {@link #outputs}.
     * @return value of {@link #outputs}
     */
    public List getOutputs() {
        if (outputs == null) {
            outputs = new ArrayList();
        }
        return outputs;
    }

    
    /**
     * Sets the value of {@link #outputs}.
     * @param outputs - value
     */
    public void setOutputs(List outputs) {
        this.outputs = outputs;
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
        return "StackData [id=" + id + ", capabilities=" + capabilities + ", notification_topics=" + notification_topics + ", links="
                + links + ", disable_rollback=" + disable_rollback + ", description=" + description + ", parameters=" + parameters
                + ", stack_status_reason=" + stack_status_reason + ", stack_name=" + stack_name + ", creation_time=" + creation_time
                + ", URL=" + URL + ", timeout_mins=" + timeout_mins + ", stack_status=" + stack_status + ", updated_time=" + updated_time
                + ", template_description=" + template_description + "]";
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy