From 55dcf3197958c76b1622a0c26489e68fe77e0314 Mon Sep 17 00:00:00 2001 From: Ravi Mantena Date: Wed, 21 Oct 2020 15:47:38 -0400 Subject: Blueprint Generator Refactored Code Issue-ID: DCAEGEN2-2472 Change-Id: I2ade7fb3b4196554eb4ecadd918fd45cb6ba8a52 Signed-off-by: Ravi Mantena --- .../blueprintgenerator/model/base/Blueprint.java | 55 ++++++++++++++++ .../onap/blueprintgenerator/model/base/Node.java | 46 ++++++++++++++ .../blueprintgenerator/model/common/Appconfig.java | 64 +++++++++++++++++++ .../blueprintgenerator/model/common/Concat.java | 48 ++++++++++++++ .../model/common/DataRouter.java | 47 ++++++++++++++ .../blueprintgenerator/model/common/Dmaap.java | 53 ++++++++++++++++ .../blueprintgenerator/model/common/GetInput.java | 54 ++++++++++++++++ .../model/common/GetProperty.java | 47 ++++++++++++++ .../blueprintgenerator/model/common/Imports.java | 45 +++++++++++++ .../blueprintgenerator/model/common/Input.java | 72 +++++++++++++++++++++ .../model/common/MessageRouter.java | 50 +++++++++++++++ .../model/componentspec/base/Auxilary.java | 74 ++++++++++++++++++++++ .../model/componentspec/base/ComponentSpec.java | 55 ++++++++++++++++ .../model/componentspec/common/Artifacts.java | 49 ++++++++++++++ .../model/componentspec/common/Calls.java | 50 +++++++++++++++ .../model/componentspec/common/Constraints.java | 60 ++++++++++++++++++ .../model/componentspec/common/Container.java | 46 ++++++++++++++ .../model/componentspec/common/EntrySchema.java | 56 ++++++++++++++++ .../model/componentspec/common/HealthCheck.java | 58 +++++++++++++++++ .../model/componentspec/common/Host.java | 47 ++++++++++++++ .../model/componentspec/common/Parameters.java | 69 ++++++++++++++++++++ .../model/componentspec/common/Policy.java | 47 ++++++++++++++ .../model/componentspec/common/PolicySchema.java | 57 +++++++++++++++++ .../model/componentspec/common/Provides.java | 52 +++++++++++++++ .../model/componentspec/common/Publishes.java | 56 ++++++++++++++++ .../model/componentspec/common/Reconfigs.java | 54 ++++++++++++++++ .../componentspec/common/RequestResponse.java | 48 ++++++++++++++ .../model/componentspec/common/Self.java | 53 ++++++++++++++++ .../model/componentspec/common/Streams.java | 50 +++++++++++++++ .../model/componentspec/common/Subscribes.java | 56 ++++++++++++++++ .../model/componentspec/common/Volumes.java | 54 ++++++++++++++++ .../blueprintgenerator/model/policy/Policies.java | 52 +++++++++++++++ .../model/policy/PoliciesNode.java | 44 +++++++++++++ .../model/policy/PoliciesProperties.java | 43 +++++++++++++ .../blueprintgenerator/model/policy/Policy.java | 44 +++++++++++++ .../model/policy/PolicyFilter.java | 52 +++++++++++++++ .../model/policy/PolicyInput.java | 45 +++++++++++++ .../model/policy/PolicyNode.java | 44 +++++++++++++ .../model/policy/PolicyProperties.java | 44 +++++++++++++ .../model/translate/GetProperty.java | 45 +++++++++++++ 40 files changed, 2085 insertions(+) create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java create mode 100644 mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java (limited to 'mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model') diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java new file mode 100644 index 0000000..a72a00d --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Blueprint.java @@ -0,0 +1,55 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.base; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Base Model: For Blueprint + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Blueprint { + + private String tosca_definitions_version; + + private String description; + + private List imports; + + private Map> inputs; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java new file mode 100644 index 0000000..c3df820 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/base/Node.java @@ -0,0 +1,46 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.base; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Base Model: For Node + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Node { + + private String type; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java new file mode 100644 index 0000000..3a18b70 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Appconfig.java @@ -0,0 +1,64 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import org.onap.blueprintgenerator.model.componentspec.common.Calls; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.Map; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For App Config + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Appconfig { + + private Calls[] services_calls; + + private Map streams_publishes; + + private Map streams_subscribes; + + private Map params; + + @JsonAnyGetter //The Map is persisted as flattened properties of the target POJO. + public Map getParams() { + return params; + } + + //Used in ONAP + private Calls[] service_calls; + +} + diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java new file mode 100644 index 0000000..d3b3c01 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Concat.java @@ -0,0 +1,48 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.List; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Concat + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Concat { + + private List concat; + +} + diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java new file mode 100644 index 0000000..49e029f --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/DataRouter.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + + +import org.onap.blueprintgenerator.constants.Constants; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Data Router + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class DataRouter extends Dmaap { + + private String type = Constants.DATA_ROUTER; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java new file mode 100644 index 0000000..de3b31e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Dmaap.java @@ -0,0 +1,53 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Dmaap + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Dmaap { + + private Object dmaap_info; + + //Below properties are used in ONAP + private String type; + + private GetInput pass; + + private GetInput user; + +} \ No newline at end of file diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java new file mode 100644 index 0000000..cc87014 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetInput.java @@ -0,0 +1,54 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Get Input + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@AllArgsConstructor +@NoArgsConstructor +public class GetInput { + + //private Object get_input; + + @JsonProperty("get_input") + private Object bpInputName; + +} \ No newline at end of file diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java new file mode 100644 index 0000000..0514d20 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/GetProperty.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.List; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Get Property + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class GetProperty { + + private List get_property; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java new file mode 100644 index 0000000..eacf20e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Imports.java @@ -0,0 +1,45 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.List; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Imports + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class Imports { + + private List imports; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java new file mode 100644 index 0000000..781ce2e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/Input.java @@ -0,0 +1,72 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.List; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Input + */ + +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Input { + + private String componentSpecPath; + + private String bluePrintName; + + private String outputPath; + + private String policyPath; + + private String bpType; + + private int numPolicies; + + private int numPolicy; + + private String comment; + + private boolean useExisting; + + private List imports; + + private boolean useDti; + + //Used in ONAP + private String serviceNameOverride; + + private String importPath; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java new file mode 100644 index 0000000..7d96785 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/common/MessageRouter.java @@ -0,0 +1,50 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.common; + +import org.onap.blueprintgenerator.constants.Constants; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Common Model: For Message Router + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class MessageRouter extends Dmaap { + + private String type = Constants.MESSAGE_ROUTER; + + private Object aaf_password; + + private Object aaf_username; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java new file mode 100644 index 0000000..9c37163 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/Auxilary.java @@ -0,0 +1,74 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.base; + + +import org.onap.blueprintgenerator.model.componentspec.common.HealthCheck; +import org.onap.blueprintgenerator.model.componentspec.common.Policy; +import org.onap.blueprintgenerator.model.componentspec.common.Reconfigs; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Auxilary + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Auxilary { + + private HealthCheck healthcheck; + + private HealthCheck livehealthcheck; + + private Policy policy; + + private Reconfigs reconfigs; + + private List> env; + + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Map databases; + +/* @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Affinity affinity;*/ + + @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) + private Object hpa_config; + + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java new file mode 100644 index 0000000..e3583e7 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/base/ComponentSpec.java @@ -0,0 +1,55 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.base; + +import org.onap.blueprintgenerator.model.componentspec.common.Artifacts; +import org.onap.blueprintgenerator.model.componentspec.common.Parameters; +import org.onap.blueprintgenerator.model.componentspec.common.Self; +import org.onap.blueprintgenerator.model.componentspec.common.Streams; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For ComponentSpec + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class ComponentSpec { + + private Self self; + + private Streams streams; + + private Parameters[] parameters; + + private Artifacts[] artifacts; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java new file mode 100644 index 0000000..0ae1c1a --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Artifacts.java @@ -0,0 +1,49 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Artifacts + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Artifacts { + + private String type; + + private String uri; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java new file mode 100644 index 0000000..752040d --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Calls.java @@ -0,0 +1,50 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Calls + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Calls { + + private String config_key; + + private RequestResponse request; + + private RequestResponse response; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java new file mode 100644 index 0000000..cb248b9 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Constraints.java @@ -0,0 +1,60 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Constraints + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Constraints { + + private Object equal; + + private int greater_than; + + private int greater_or_equal; + + private int less_than; + + private int less_or_equal; + + private Object[] valid_values; + + private int length; + + private int min_length; + + private int max_length; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java new file mode 100644 index 0000000..3157338 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Container.java @@ -0,0 +1,46 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Container + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@EqualsAndHashCode +public class Container { + + private String bind; + + private String mode; +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java new file mode 100644 index 0000000..d0355ea --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/EntrySchema.java @@ -0,0 +1,56 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Entry Schema + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class EntrySchema { + + private String name; + + private String description; + + private String type; + + private String value; + + private EntrySchema[] entry_schema; + + private boolean required; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java new file mode 100644 index 0000000..01c1497 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/HealthCheck.java @@ -0,0 +1,58 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For HealthCheck + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class HealthCheck { + + private String interval; + + private String timeout; + + private String script; + + private String type; + + private String endpoint; + + private String initialDelaySeconds; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java new file mode 100644 index 0000000..6a9d812 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Host.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Host + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@EqualsAndHashCode +public class Host { + + private String path; + + private String mode; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java new file mode 100644 index 0000000..9c1931c --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Parameters.java @@ -0,0 +1,69 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Parameters + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Parameters { + + private String name; + + private Object value; + + private String description; + + private boolean sourced_at_deployment; + + private boolean designer_editable; + + private boolean policy_editable; + + private boolean required; + + private String type; + + private String policy_group; + + private PolicySchema[] policy_schema; + + private EntrySchema[] entry_schema; + + private Constraints[] constraints; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java new file mode 100644 index 0000000..ea419f3 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Policy.java @@ -0,0 +1,47 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Policy + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@EqualsAndHashCode +public class Policy { + + private String trigger_type; + + private String script_path; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java new file mode 100644 index 0000000..2d17086 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/PolicySchema.java @@ -0,0 +1,57 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Policy Schema + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class PolicySchema { + + private String name; + + private String description; + + private String type; + + private String value; + + private EntrySchema[] entry_schema; + + private boolean required; + + private Constraints[] constraints; + + } diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java new file mode 100644 index 0000000..5301cbe --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Provides.java @@ -0,0 +1,52 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Provides + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Provides { + + private String route; + + private RequestResponse request; + + private RequestResponse response; + + //Used in ONAP + private String verb; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java new file mode 100644 index 0000000..cd8230e --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Publishes.java @@ -0,0 +1,56 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Publishes + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Publishes { + + private String config_key; + + private String format; + + private String type; + + private String version; + + //Used in ONAP + private String route; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java new file mode 100644 index 0000000..96b0fb3 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Reconfigs.java @@ -0,0 +1,54 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Reconfigs + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Reconfigs { + + private String dti; + + private String app_reconfig; + + private String policy; + + private String streams; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java new file mode 100644 index 0000000..0376de1 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/RequestResponse.java @@ -0,0 +1,48 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Request Response + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class RequestResponse { + + private String format; + + private String version; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java new file mode 100644 index 0000000..b657b16 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Self.java @@ -0,0 +1,53 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Self + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Self { + + private String component_type; + + private String description; + + private String name; + + private String version; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java new file mode 100644 index 0000000..3791e32 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Streams.java @@ -0,0 +1,50 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Streams + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Streams { + + private Publishes[] publishes; + + private Subscribes[] subscribes; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java new file mode 100644 index 0000000..668a517 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Subscribes.java @@ -0,0 +1,56 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Subscribes + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Subscribes { + + private String config_key; + + private String format; + + private String route; + + private String type; + + private String version; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java new file mode 100644 index 0000000..6f12b47 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/componentspec/common/Volumes.java @@ -0,0 +1,54 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.componentspec.common; + + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAP and DCAE Blueprint Applications + * Component Spec Model: For Volumes + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +@EqualsAndHashCode +public class Volumes { + + private Container container; + + private Host host; + + private String type; + + private String name; + +} \ No newline at end of file diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java new file mode 100644 index 0000000..35d210c --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policies.java @@ -0,0 +1,52 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import org.onap.blueprintgenerator.constants.Constants; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policies + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class Policies { + + private String configAttributes; + + private String configName; + + private String onapName = Constants.ONAP_NAME_DCAE; + + private String policyName = Constants.POLICIES_POLICYNAME_DCAECONFIG; + + private boolean unique = false; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java new file mode 100644 index 0000000..7b951cc --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesNode.java @@ -0,0 +1,44 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import org.onap.blueprintgenerator.model.base.Node; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policies Node + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PoliciesNode extends Node { + + private PoliciesProperties properties; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java new file mode 100644 index 0000000..11844bf --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PoliciesProperties.java @@ -0,0 +1,43 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policies Properties + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PoliciesProperties { + + private PolicyFilter policy_filter; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java new file mode 100644 index 0000000..b5f098c --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/Policy.java @@ -0,0 +1,44 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policy + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class Policy { + + private String policy_id; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java new file mode 100644 index 0000000..e49e6c3 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyFilter.java @@ -0,0 +1,52 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import org.onap.blueprintgenerator.constants.Constants; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policy Filters + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PolicyFilter { + + private String configAttributes = Constants.EMPTY; + + private String configName = Constants.EMPTY; + + private String onapName = Constants.ONAP_NAME_DCAE; + + private Object policyName; + + private boolean unique = false; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java new file mode 100644 index 0000000..ca13cd7 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyInput.java @@ -0,0 +1,45 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policy Input + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PolicyInput { + + private Policies[] policies; + + private Policy[] policy; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java new file mode 100644 index 0000000..f5ebf05 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyNode.java @@ -0,0 +1,44 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import org.onap.blueprintgenerator.model.base.Node; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policy Node + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PolicyNode extends Node { + + private PolicyProperties properties; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java new file mode 100644 index 0000000..8ec4a32 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/policy/PolicyProperties.java @@ -0,0 +1,44 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.policy; + +import org.onap.blueprintgenerator.model.common.GetInput; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Policy Model: To Get Policy Properties + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class PolicyProperties { + + private GetInput policy_id; + +} diff --git a/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java new file mode 100644 index 0000000..47994c3 --- /dev/null +++ b/mod/bpgenerator/common/src/main/java/org/onap/blueprintgenerator/model/translate/GetProperty.java @@ -0,0 +1,45 @@ +/* + * + * * ============LICENSE_START======================================================= + * * org.onap.dcae + * * ================================================================================ + * * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved. + * * ================================================================================ + * * Licensed 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. + * * ============LICENSE_END========================================================= + * + * + */ + +package org.onap.blueprintgenerator.model.translate; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; + +import java.util.List; + +/** + * @author : Ravi Mantena + * @date 10/16/2020 + * Application: DCAE/ONAP - Blueprint Generator + * Common Module: Used by both ONAp and DCAE Blueprint Applications + * Translate Model: To Get Property + */ + +@Data +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class GetProperty { + + private List get_property; + +} -- cgit 1.2.3-korg