-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Storage pool response improvements #10740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.19
Are you sure you want to change the base?
Changes from all commits
6adf4d3
333a395
d676cef
f150493
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -77,19 +77,24 @@ | |||||
@Param(description = "the name of the cluster for the storage pool") | ||||||
private String clusterName; | ||||||
|
||||||
@SerializedName(ApiConstants.CAPACITY_BYTES) | ||||||
@Param(description = "bytes CloudStack can provision from this storage pool", since = "4.19.3") | ||||||
private Long capacityBytes; | ||||||
|
||||||
@Deprecated(since = "4.19.3") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
@SerializedName("disksizetotal") | ||||||
@Param(description = "the total disk size of the storage pool") | ||||||
private Long diskSizeTotal; | ||||||
|
||||||
@SerializedName("disksizeallocated") | ||||||
@Param(description = "the host's currently allocated disk size") | ||||||
@Param(description = "the pool's currently allocated disk size") | ||||||
private Long diskSizeAllocated; | ||||||
|
||||||
@SerializedName("disksizeused") | ||||||
@Param(description = "the host's currently used disk size") | ||||||
@Param(description = "the pool's currently used disk size") | ||||||
private Long diskSizeUsed; | ||||||
|
||||||
@SerializedName("capacityiops") | ||||||
@SerializedName(ApiConstants.CAPACITY_IOPS) | ||||||
@Param(description = "IOPS CloudStack can provision from this storage pool") | ||||||
private Long capacityIops; | ||||||
|
||||||
|
@@ -145,6 +150,10 @@ | |||||
@Param(description = "whether this pool is managed or not") | ||||||
private Boolean managed; | ||||||
|
||||||
@SerializedName(ApiConstants.DETAILS) | ||||||
@Param(description = "additional key/value details of the storage pool", since = "4.19.3") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
private Map<String, String> details; | ||||||
|
||||||
public Map<String, String> getCaps() { | ||||||
return caps; | ||||||
} | ||||||
|
@@ -276,6 +285,14 @@ | |||||
this.clusterName = clusterName; | ||||||
} | ||||||
|
||||||
public Long getCapacityBytes() { | ||||||
return capacityBytes; | ||||||
} | ||||||
Check warning on line 290 in api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java
|
||||||
|
||||||
public void setCapacityBytes(Long capacityBytes) { | ||||||
this.capacityBytes = capacityBytes; | ||||||
} | ||||||
Check warning on line 294 in api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java
|
||||||
|
||||||
public Long getDiskSizeTotal() { | ||||||
return diskSizeTotal; | ||||||
} | ||||||
|
@@ -395,4 +412,12 @@ | |||||
public void setManaged(Boolean managed) { | ||||||
this.managed = managed; | ||||||
} | ||||||
|
||||||
public Map<String, String> getDetails() { | ||||||
return details; | ||||||
} | ||||||
Check warning on line 418 in api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java
|
||||||
|
||||||
public void setDetails(Map<String, String> details) { | ||||||
this.details = details; | ||||||
} | ||||||
Check warning on line 422 in api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java
|
||||||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reconsidder in which version this is added and rename the file. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// 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 com.cloud.upgrade.dao; | ||
|
||
import com.cloud.utils.exception.CloudRuntimeException; | ||
|
||
import java.io.InputStream; | ||
import java.sql.Connection; | ||
|
||
public class Upgrade41920to41930 implements DbUpgrade { | ||
|
||
@Override | ||
public String[] getUpgradableVersionRange() { | ||
return new String[]{"4.19.2.0", "4.19.3.0"}; | ||
} | ||
|
||
@Override | ||
public String getUpgradedVersion() { | ||
return "4.19.3.0"; | ||
} | ||
|
||
@Override | ||
public boolean supportsRollingUpgrade() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public InputStream[] getPrepareScripts() { | ||
final String scriptFile = "META-INF/db/schema-41920to41930.sql"; | ||
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile); | ||
if (script == null) { | ||
throw new CloudRuntimeException("Unable to find " + scriptFile); | ||
} | ||
|
||
return new InputStream[]{script}; | ||
} | ||
|
||
@Override | ||
public void performDataMigration(Connection conn) { | ||
} | ||
|
||
@Override | ||
public InputStream[] getCleanupScripts() { | ||
final String scriptFile = "META-INF/db/schema-41920to41930-cleanup.sql"; | ||
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile); | ||
if (script == null) { | ||
throw new CloudRuntimeException("Unable to find " + scriptFile); | ||
} | ||
|
||
return new InputStream[]{script}; | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rename file |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- 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. | ||
|
||
--; | ||
-- Schema upgrade cleanup from 4.19.2.0 to 4.19.3.0 | ||
--; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rename file |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- 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. | ||
|
||
--; | ||
-- Schema upgrade from 4.19.2.0 to 4.19.3.0 | ||
--; | ||
|
||
-- Updated display to false for password/token detail of the storage pool details | ||
UPDATE `cloud`.`storage_pool_details` SET display = 0 WHERE name LIKE '%password%'; | ||
UPDATE `cloud`.`storage_pool_details` SET display = 0 WHERE name LIKE '%token%'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.