/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.stratos.cloud.controller.domain;

import org.apache.stratos.common.Properties;

/**
 * Instance context defines information required for starting an IaaS instance.
 */
public class InstanceContext {
    private String clusterId;
    private String clusterInstanceId;
    private long initTime;
    private long obsoleteExpiryTime;
    private String networkPartitionId;
    private Partition partition;
    private String cartridgeType;
    private Properties properties;

    public String getClusterId() {
        return clusterId;
    }

    public void setClusterId(String clusterId) {
        this.clusterId = clusterId;
    }

    public String getNetworkPartitionId() {
        return networkPartitionId;
    }

    public void setNetworkPartitionId(String networkPartitionId) {
        this.networkPartitionId = networkPartitionId;
    }

    public Partition getPartition() {
        return partition;
    }

    public void setPartition(Partition partition) {
        this.partition = partition;
    }

    public String getCartridgeType() {
        return cartridgeType;
    }

    public void setCartridgeType(String cartridgeType) {
        this.cartridgeType = cartridgeType;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public String getClusterInstanceId() {
        return clusterInstanceId;
    }

    public void setClusterInstanceId(String clusterInstanceId) {
        this.clusterInstanceId = clusterInstanceId;
    }

    public long getInitTime() {
        return initTime;
    }

    public void setInitTime(long initTime) {
        this.initTime = initTime;
    }

    public long getObsoleteExpiryTime() {
        return obsoleteExpiryTime;
    }

    public void setObsoleteExpiryTime(long obsoleteExpiryTime) {
        this.obsoleteExpiryTime = obsoleteExpiryTime;
    }
}

@@ -854,16 +854,60 @@
 omain;%0A%0A
+import org.apache.commons.lang3.ArrayUtils;%0A
 import o
@@ -1335,16 +1335,84 @@
 perties;
+%0A    private boolean isVolumeRequired;%0A    private Volume%5B%5D volumes;
 %0A%0A    pu
@@ -2870,10 +2870,380 @@
 ;%0A    %7D%0A
+%0A    public boolean isVolumeRequired() %7B%0A        return isVolumeRequired;%0A    %7D%0A%0A    public void setVolumeRequired(boolean isVolumeRequired) %7B%0A        this.isVolumeRequired = isVolumeRequired;%0A    %7D%0A%0A    public Volume%5B%5D getVolumes() %7B%0A        return volumes;%0A    %7D%0A%0A    public void setVolumes(Volume%5B%5D volumes) %7B%0A        this.volumes = ArrayUtils.clone(volumes);%0A    %7D%0A%0A
 %7D%0A

Add persistance volumes to InstanceContext