Skip to content

Commit

Permalink
Merge pull request ContainX#17 from olivergondza/declare-api-deprecated
Browse files Browse the repository at this point in the history
Deprecate domain objects and builders for deprecated services
  • Loading branch information
olivergondza authored Feb 14, 2020
2 parents 76589ff + 275529e commit f980a41
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 29 deletions.
11 changes: 4 additions & 7 deletions core/src/main/java/org/openstack4j/api/Builders.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.openstack4j.model.artifact.builder.ArtifactUpdateBuilder;
import org.openstack4j.model.artifact.builder.ToscaTemplatesArtifactBuilder;
import org.openstack4j.model.barbican.Secret;
import org.openstack4j.model.barbican.builder.ContainerCreateBuilder;
import org.openstack4j.model.barbican.builder.ContainerSecretBuilder;
import org.openstack4j.model.barbican.builder.SecretCreateBuilder;
Expand Down Expand Up @@ -182,7 +181,7 @@ public static NetworkBuilder network() {
/**
* The builder to create a Flow Classifier
*
* @return the Flow Classifier builder
* @return the Flow Classifier builder
*/
public static FlowClassifierBuilder flowClassifier() {
return NeutronFlowClassifier.builder();
Expand Down Expand Up @@ -290,7 +289,9 @@ public static VolumeBackupCreateBuilder volumeBackupCreate(){
* The builder to create a Compute/Nova Floating IP
*
* @return the floating ip builder
* @deprecated @deprecated Since these APIs are only implemented for nova-network, they are deprecated. These will fail with a 404 starting from microversion 2.36. They were removed in the 18.0.0 Rocky release.
*/
@Deprecated
public static FloatingIPBuilder floatingIP() {
return NovaFloatingIP.builder();
}
Expand Down Expand Up @@ -378,7 +379,6 @@ public static StackUpdateBuilder stackUpdate() {

/**
* The builder to create a {@link ResourceHealth}
* @return
*/
public static ResourceHealthBuilder resourceHealth() {
return HeatResourceHealth.builder();
Expand Down Expand Up @@ -853,10 +853,7 @@ public static NatPoolBuilder natPool() {
}

/**
* The builder which creates network service policy for gbp
*
*
* @return
* The builder which creates network service policy for gbp.
*/
public static NetworkServicePolicyBuilder networkServicePolicy() {
return GbpNetworkServicePolicy.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.openstack4j.model.common.ActionResponse;
import org.openstack4j.model.network.NetFloatingIP;


/**
* Provides Neutron-based FloatingIP services.
*
Expand All @@ -26,7 +25,6 @@ public interface NetFloatingIPService extends RestService {
* Returns list of floating IPs filtered by parameters.
*
* @param filteringParams map (name, value) of filtering parameters
* @return
*/
List<? extends NetFloatingIP> list(Map<String, String> filteringParams);

Expand All @@ -37,41 +35,35 @@ public interface NetFloatingIPService extends RestService {
* @return the NetFloatingIP
*/
NetFloatingIP get(String id);



/**
* Deletes NetFloatingIP by id.
*
* @param id the id
* @return the action response
*/
ActionResponse delete(String id);



/**
* Creates a new Floating IP
*
* @param floatingIp the floating ip
* @return the net floating ip
*/
NetFloatingIP create(NetFloatingIP floatingIp);



/**
* Associates a Floating IP to a Port.
*
* @param floatingIp the floating ip
* @return the net floating ip
*/
NetFloatingIP associateToPort(String id, String portId);


/**
* Deassociate's from port.
* Disassociate from port.
*
* @param floatingIp the floating ip
* @return the net floating ip
*/
NetFloatingIP disassociateFromPort(String id);

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

/**
* The Interface FloatingIP.
*
*
*
* @author nanderson
*/
@Deprecated
public interface FloatingIP extends ModelEntity, Buildable<FloatingIPBuilder> {

/**
Expand Down Expand Up @@ -46,4 +47,4 @@ public interface FloatingIP extends ModelEntity, Buildable<FloatingIPBuilder> {
* @return the pool name
*/
String getPool();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @author Qin An
*/
@Deprecated
public interface HostResource extends ModelEntity {
/**
* @return the number of CPUs of the compute host
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/org/openstack4j/model/compute/Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
*
* @author Jeremy Unruh
*/
@Deprecated
public interface Image extends ModelEntity {

/**
* Status can be used while an image is being saved. It provides state of the progress indicator. Images with ACTIVE status
* are available for install.
*/
@Deprecated
enum Status {
UNRECOGNIZED, UNKNOWN, ACTIVE, SAVING, ERROR, DELETED;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
*
* @author Jeremy Unruh
*/
@Deprecated
public interface SecGroupExtension extends ModelEntity{

/**
* Security Group Rule
*/
@Deprecated
public interface Rule extends ModelEntity, Buildable<SecurityGroupRuleBuilder>
{

Expand Down Expand Up @@ -66,6 +68,7 @@ public interface Rule extends ModelEntity, Buildable<SecurityGroupRuleBuilder>
* Rule Group
*
*/
@Deprecated
public interface Group
{

Expand All @@ -85,6 +88,7 @@ public interface Group
/**
* Rule IP Range
*/
@Deprecated
public interface IpRange {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.openstack4j.model.compute.builder;

import org.openstack4j.openstack.compute.domain.*;

/**
* The Compute Builders
*/
Expand Down Expand Up @@ -32,7 +30,9 @@ public interface ComputeBuilders {
* The builder to create a Compute/Nova Floating IP
*
* @return the floating ip builder
* @deprecated Since these APIs are only implemented for nova-network, they are deprecated. These will fail with a 404 starting from microversion 2.36. They were removed in the 18.0.0 Rocky release.
*/
@Deprecated
public FloatingIPBuilder floatingIP();

/**
Expand All @@ -41,5 +41,4 @@ public interface ComputeBuilders {
* @return the QuotaSet update builder
*/
public QuotaSetUpdateBuilder quotaSet();

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @author Nathan Anderson
*/
@Deprecated
public interface FloatingIPBuilder extends Builder<FloatingIPBuilder, FloatingIP> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @author Jeremy Unruh
*/
@Deprecated
public interface SecurityGroupRuleBuilder extends Builder<SecurityGroupRuleBuilder, Rule> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @author Jeremy Unruh
*/
@Deprecated
public interface DNSEntry extends ModelEntity {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
*
* @author Jeremy Unruh
*/
@Deprecated
public interface DomainEntry extends ModelEntity {


@Deprecated
public enum Scope {
PUBLIC,
PRIVATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @author Nathan Anderson
*/
@JsonRootName("floating_ip")
@Deprecated
public class NovaFloatingIP implements FloatingIP {

private static final long serialVersionUID = -4441740897994315920L;
Expand Down Expand Up @@ -109,6 +110,7 @@ public String toString() {
*
* @author Nathan Anderson
*/
@Deprecated
public static class NovaFloatingIPs extends ListResult<NovaFloatingIP> {

private static final long serialVersionUID = 1L;
Expand All @@ -131,6 +133,7 @@ protected List<NovaFloatingIP> value() {
*
* @author Nathan Anderson
*/
@Deprecated
public static class FloatingIPConcreteBuilder implements FloatingIPBuilder {

NovaFloatingIP m = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @author Elina Meier
*/
@JsonRootName("resource")
@Deprecated
public class NovaHostResource implements HostResource {

public static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -76,7 +77,6 @@ public String getProject() {
* <p>Author:Wang Ting/王婷</p>
* @Title: getService
* @return
* @see org.openstack4j.model.compute.Host#getService()
*/
@Override
public String getService() {
Expand All @@ -87,7 +87,6 @@ public String getService() {
* <p>Author:Wang Ting/王婷</p>
* @Title: getZone
* @return
* @see org.openstack4j.model.compute.Host#getZone()
*/
@Override
public String getZone() {
Expand All @@ -98,7 +97,6 @@ public String getZone() {
* <p>Author:Wang Ting/王婷</p>
* @Title: getHostName
* @return
* @see org.openstack4j.model.compute.Host#getHostName()
*/
@Override
public String getHostName() {
Expand All @@ -123,6 +121,7 @@ public String toString() {
* @author Wang Ting/王婷
*
*/
@Deprecated
public static class NovaHostResources extends ListResult<NovaHostResource> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* @author Jeremy Unruh
*/
@JsonRootName("image")
@Deprecated
public class NovaImage implements Image {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -160,6 +161,7 @@ public String toString() {
.toString();
}

@Deprecated
public static class NovaImages extends ListResult<NovaImage> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @author Jeremy Unruh
*/
@JsonRootName("security_group")
@Deprecated
public class NovaSecGroupExtension implements SecGroupExtension {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -105,7 +106,7 @@ public String toString() {
.toString();
}


@Deprecated
public static class SecurityGroups extends ListResult<NovaSecGroupExtension> {

private static final long serialVersionUID = 1L;
Expand All @@ -123,6 +124,7 @@ protected List<NovaSecGroupExtension> value() {
* Security Group Rule
*/
@JsonRootName("security_group_rule")
@Deprecated
public static class SecurityGroupRule implements SecGroupExtension.Rule {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -238,6 +240,7 @@ public static SecurityGroupRuleBuilder builder() {
return new RuleConcreteBuilder();
}

@Deprecated
public static class RuleConcreteBuilder implements SecurityGroupRuleBuilder
{

Expand Down Expand Up @@ -298,6 +301,7 @@ public SecurityGroupRuleBuilder from(Rule in) {
/**
* Security Group Rule -> Group
*/
@Deprecated
public static class RuleGroup implements Group {

private String name;
Expand Down Expand Up @@ -334,6 +338,7 @@ public String toString() {
/**
* Security Group Rule -> IP Range
*/
@Deprecated
public static class RuleIpRange implements IpRange {

private String cidr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @author Jeremy Unruh
*/
@JsonRootName("dns_entry")
@Deprecated
public class ExtDNSEntry implements DNSEntry {

private static final long serialVersionUID = 1L;
Expand Down Expand Up @@ -77,6 +78,7 @@ public String toString() {
.toString();
}

@Deprecated
public static class DNSEntries extends ListResult<ExtDNSEntry> {

private static final long serialVersionUID = 1L;
Expand Down
Loading

0 comments on commit f980a41

Please sign in to comment.