Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/src/main/java/com/cloud/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.Serializable;
import java.net.URI;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.cloud.exception.InvalidParameterValueException;
Expand Down Expand Up @@ -456,4 +457,6 @@ public void setIp6Address(String ip6Address) {
String getRouterIp();

String getRouterIpv6();

Date getCreated();
}
6 changes: 6 additions & 0 deletions api/src/main/java/com/cloud/network/NetworkProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.cloud.network;

import java.net.URI;
import java.util.Date;

import com.cloud.network.Networks.BroadcastDomainType;
import com.cloud.network.Networks.Mode;
Expand Down Expand Up @@ -329,4 +330,9 @@ public String getRouterIpv6() {
return null;
}

@Override
public Date getCreated() {
return null;
}

}
4 changes: 4 additions & 0 deletions api/src/main/java/com/cloud/network/vpc/Vpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;

import java.util.Date;

public interface Vpc extends ControlledEntity, Identity, InternalIdentity {

public enum State {
Expand Down Expand Up @@ -91,4 +93,6 @@ public enum State {
boolean isRollingRestart();

void setRollingRestart(boolean rollingRestart);

Date getCreated();
}
4 changes: 4 additions & 0 deletions api/src/main/java/com/cloud/offering/NetworkOffering.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import com.cloud.network.Network.GuestType;
import com.cloud.network.Networks.TrafficType;

import java.util.Date;

/**
* Describes network offering
*
Expand Down Expand Up @@ -141,4 +143,6 @@ public enum Detail {
boolean isSupportingPublicAccess();

String getServicePackage();

Date getCreated();
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.
package org.apache.cloudstack.api.response;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -246,6 +247,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
@Param(description = "If the network has redundant routers enabled", since = "4.11.1")
private Boolean redundantRouter;

@SerializedName(ApiConstants.CREATED)
@Param(description = "the date this network was created", since = "4.16.0")
private Date created;

public Boolean getDisplayNetwork() {
return displayNetwork;
}
Expand Down Expand Up @@ -482,4 +487,12 @@ public String getVpcName() {
public void setVpcName(String vpcName) {
this.vpcName = vpcName;
}

public Date getCreated() {
return created;
}

public void setCreated(Date created) {
this.created = created;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.cloudstack.api.response;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -207,6 +208,10 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou
@Param(description = "the total number of virtual machines running for this project", since = "4.2.0")
private Integer vmRunning;

@SerializedName(ApiConstants.CREATED)
@Param(description = "the date this project was created", since = "4.16.0")
private Date created;

public void setId(String id) {
this.id = id;
}
Expand Down Expand Up @@ -421,4 +426,12 @@ public void setSecondaryStorageAvailable(String secondaryStorageAvailable) {
public void setOwners(List<Map<String, String>> owners) {
this.owners = owners;
}

public Date getCreated() {
return created;
}

public void setCreated(Date created) {
this.created = created;
}
}
5 changes: 5 additions & 0 deletions engine/schema/src/main/java/com/cloud/network/vpc/VpcVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ public void setRollingRestart(boolean rollingRestart) {
this.rollingRestart = rollingRestart;
}

@Override
public Date getCreated() {
return created;
}

@Override
public Class<?> getEntityType() {
return Vpc.class;
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/com/cloud/api/ApiResponseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,7 @@ public NetworkResponse createNetworkResponse(ResponseView view, Network network)
}
response.setExternalId(network.getExternalId());
response.setRedundantRouter(network.isRedundant());
response.setCreated(network.getCreated());
response.setObjectName("network");
return response;
}
Expand Down Expand Up @@ -2963,6 +2964,7 @@ public VpcResponse createVpcResponse(ResponseView view, Vpc vpc) {
response.setId(vpc.getUuid());
response.setName(vpc.getName());
response.setDisplayText(vpc.getDisplayText());
response.setCreated(vpc.getCreated());
response.setState(vpc.getState().name());
VpcOffering voff = ApiDBUtils.findVpcOfferingById(vpc.getVpcOfferingId());
if (voff != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public NetworkOfferingResponse newNetworkOfferingResponse(NetworkOffering offeri
networkOfferingResponse.setConcurrentConnections(offering.getConcurrentConnections());
networkOfferingResponse.setSupportsStrechedL2Subnet(offering.isSupportingStrechedL2());
networkOfferingResponse.setSupportsPublicAccess(offering.isSupportingPublicAccess());
networkOfferingResponse.setCreated(offering.getCreated());
if (offering.getGuestType() != null) {
networkOfferingResponse.setGuestIpType(offering.getGuestType().toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public ProjectResponse newProjectResponse(EnumSet<DomainDetails> details, Projec
ownersList.add(ownerDetails);
}
response.setOwners(ownersList);
response.setCreated(proj.getCreated());

// update tag information
List<ResourceTagJoinVO> tags = ApiDBUtils.listResourceTagViewByResourceUUID(proj.getUuid(), ResourceObjectType.Project);
Expand Down