|
| 1 | +// Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +// or more contributor license agreements. See the NOTICE file |
| 3 | +// distributed with this work for additional information |
| 4 | +// regarding copyright ownership. The ASF licenses this file |
| 5 | +// to you under the Apache License, Version 2.0 (the |
| 6 | +// "License"); you may not use this file except in compliance |
| 7 | +// with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +// Unless required by applicable law or agreed to in writing, |
| 12 | +// software distributed under the License is distributed on an |
| 13 | +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +// KIND, either express or implied. See the License for the |
| 15 | +// specific language governing permissions and limitations |
| 16 | +// under the License. |
| 17 | +package com.cloud.agent.api.storage; |
| 18 | + |
| 19 | +import com.cloud.agent.api.Command; |
| 20 | +import com.cloud.agent.api.to.StorageFilerTO; |
| 21 | +import com.cloud.storage.StoragePool; |
| 22 | + |
| 23 | +public class ResizeVolumeCommand extends Command { |
| 24 | + private String path; |
| 25 | + private StorageFilerTO pool; |
| 26 | + private String vmInstance; |
| 27 | + private Long newSize; |
| 28 | + private Long currentSize; |
| 29 | + private boolean shrinkOk; |
| 30 | + |
| 31 | + protected ResizeVolumeCommand() { |
| 32 | + |
| 33 | + } |
| 34 | + |
| 35 | + public ResizeVolumeCommand(String path, |
| 36 | + StorageFilerTO pool, |
| 37 | + Long currentSize, |
| 38 | + Long newSize, |
| 39 | + boolean shrinkOk, |
| 40 | + String vmInstance) |
| 41 | + { |
| 42 | + this.path = path; |
| 43 | + this.pool = pool; |
| 44 | + this.vmInstance = vmInstance; |
| 45 | + this.currentSize = currentSize; |
| 46 | + this.newSize = newSize; |
| 47 | + this.shrinkOk = shrinkOk; |
| 48 | + } |
| 49 | + |
| 50 | + public String getPath() { |
| 51 | + return path; |
| 52 | + } |
| 53 | + |
| 54 | + public String getPoolUuid() { |
| 55 | + return pool.getUuid(); |
| 56 | + } |
| 57 | + |
| 58 | + public StorageFilerTO getPool() { |
| 59 | + return pool; |
| 60 | + } |
| 61 | + |
| 62 | + public long getNewSize() { |
| 63 | + return newSize; |
| 64 | + } |
| 65 | + |
| 66 | + public long getCurrentSize() { |
| 67 | + return currentSize; |
| 68 | + } |
| 69 | + |
| 70 | + public boolean getShrinkOk() { |
| 71 | + return shrinkOk; |
| 72 | + } |
| 73 | + |
| 74 | + public String getInstanceName() { |
| 75 | + return vmInstance; |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * {@inheritDoc} |
| 80 | + */ |
| 81 | + @Override |
| 82 | + public boolean executeInSequence() { |
| 83 | + return false; |
| 84 | + } |
| 85 | + |
| 86 | +} |
0 commit comments