Resolve "Populate main branch with initial commit (Release 0)"

Closes #2 (closed)

Merge request reports

Loading
+35
Changes for src/main/java/org/etsi/osl/sol005nbi/OSMUtil/OSMNSExtractor.java: 35 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.sol005nbi.osm5
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * 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.etsi.osl.sol005nbi.OSMUtil;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

public interface OSMNSExtractor {

	public Object extractNsDescriptor() throws IOException  ;	

	public String getDescriptorYAMLfile() ;

	public void setDescriptorYAMLfile(String descriptorYAMLfile) ;
	
    public ByteArrayOutputStream getIconfilePath() ;
       
}
+34
Changes for src/main/java/org/etsi/osl/sol005nbi/OSMUtil/OSMVNFDExtractor.java: 34 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.sol005nbi.osm5
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * 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.etsi.osl.sol005nbi.OSMUtil;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

public interface OSMVNFDExtractor {

    Object extractVnfdDescriptor() throws IOException ;

	public String getDescriptorYAMLfile() ;

	public void setDescriptorYAMLfile(String descriptorYAMLfile) ;

    public ByteArrayOutputStream getIconfilePath() ;
}
+36
Changes for src/main/java/org/etsi/osl/sol005nbi/ANSCreateInstanceRequestPayload.java: 36 added lines, 0 removed lines.
Original line number Diff line number Diff line
package org.etsi.osl.sol005nbi;
/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.sol007nbi.osm
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * 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==================================
 */


/**
 * @author ctranoris
 *
 */
public class ANSCreateInstanceRequestPayload extends ANSInstantiateInstanceRequestPayload
{	
	private final String notificationType = "NsIdentifierCreationNotification";
	
	public ANSCreateInstanceRequestPayload()
	{
		super();
	}		
}
+207
Changes for src/main/java/org/etsi/osl/sol005nbi/ANSInstantiateInstanceRequestPayload.java: 207 added lines, 0 removed lines.
Original line number Diff line number Diff line
package org.etsi.osl.sol005nbi;
/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.sol005nbi
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * 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==================================
 */

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class ANSInstantiateInstanceRequestPayload
{
	private String nsName;
	public String getNsName() {
		return nsName;
	}

	public void setNsName(String nsName) {
		this.nsName = nsName;
	}

	private String vimAccountId;
	public String getVimAccountId() {
		return vimAccountId;
	}

	public void setVimAccountId(String vimAccountId) {
		this.vimAccountId = vimAccountId;
	}

	private Boolean wimAccountId;
	public Boolean getWimAccountId() {
		return wimAccountId;
	}

	public void setWimAccountId(Boolean wimAccountId) {
		this.wimAccountId = wimAccountId;
	}

	
	private String nsdId;
	public String getNsdId() {
		return nsdId;
	}

	public void setNsdId(String nsdId) {
		this.nsdId = nsdId;
	}

	public class VnF
	{
		@JsonProperty("member-vnf-index")
		private String memberVnFIndex;
		public String getMemberVnFIndex() {
			return memberVnFIndex;
		}
		public void setMemberVnFIndex(String memberVnFIndex) {
			this.memberVnFIndex = memberVnFIndex;
		}
		@JsonProperty("vdu")
		private List<Vdu> vdu = null;
		
		public List<Vdu> getVdu() {
			return vdu;
		}
		public void setVdu(List<Vdu> vdu) {
			this.vdu = vdu;
		}
		
		@JsonProperty("vimAccountId")
		private String vimAccount;
		public String getVimAccount() {
			return vimAccount;
		}
		public void setVimAccount(String vimAccount) {
			this.vimAccount = vimAccount;
		}
		
		public VnF()
		{
			
		};
	}
	
	
	public class Vdu
	{
		@JsonProperty("id")
		private String id;
		@JsonProperty("interface")
		private ArrayList<NInterface> interfaceObj = null;

		public ArrayList<NInterface> getInterfaceObj() {
			return interfaceObj;
		}
		public void setInterfaceObj(ArrayList<NInterface> interfaceObj) {
			this.interfaceObj = interfaceObj;
		}
		public String getId() {
			return id;
		}
		public void setId(String id) {
			this.id = id;
		}
	}
	
	public class NInterface
	{
		@JsonProperty("name")
		private String name;
		@JsonProperty("floating-ip-required")
		private Boolean floating_ip_required;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public Boolean getFloating_ip_required() {
			return floating_ip_required;
		}
		public void setFloating_ip_required(Boolean floating_ip_required) {
			this.floating_ip_required = floating_ip_required;
		}
	}

	class Vld
	{
		@JsonProperty("name")
		private String name;
		@JsonProperty("vim-network-name")
		private LinkedHashMap<String,String> vimNetworkName = new LinkedHashMap<>();

		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public LinkedHashMap<String, String> getVimNetworkName() {
			return vimNetworkName;
		}
		public void setVimNetworkName(LinkedHashMap<String, String> vimNetworkName) {
			this.vimNetworkName = vimNetworkName;
		}
//		private String vimNetworkName;
//		public String getVimNetworkName() {
//			return vimNetworkName;
//		}
//		public void setVimNetworkName(String vimNetworkName) {
//			this.vimNetworkName = vimNetworkName;
//		}
	}
	private List<VnF> vnf = new ArrayList<>();
	public List<VnF> getVnf() {
		return vnf;
	}

	public void setVnf(List<VnF> vnf) {
		this.vnf = vnf;
	}

	private List<Vld> vld = new ArrayList<>();
	
	public List<Vld> getVld() {
		return vld;
	}

	public void setVld(List<Vld> vld) {
		this.vld = vld;
	}
	
	public String toJSON()
	{
		String jsonInString=null;
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(Include.NON_NULL);
		try {
			jsonInString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(this);
		} catch (JsonProcessingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
		return jsonInString;
	}
	
}
+163
Changes for src/main/java/org/etsi/osl/sol005nbi/ANSScaleRequestPayload.java: 163 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*-
 * ========================LICENSE_START=================================
 * org.etsi.osl.sol007nbi.osm
 * %%
 * Copyright (C) 2019 openslice.io
 * %%
 * 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.etsi.osl.sol005nbi;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @author Ioannis Chatzis
 *
 */

enum ScaleVnfType {SCALE_OUT, SCALE_IN};

public class ANSScaleRequestPayload 
{		
	public class ScaleVnfData
	{
		public class ScaleByStepData
		{
			@JsonProperty("scaling-group-descriptor")
			private String scaling_group_descriptor;
			@JsonProperty("member-vnf-index")
			private String member_vnf_index;
			@JsonProperty("scaling-policy")
			private String scaling_policy;

			public String getScaling_group_descriptor() {
				return scaling_group_descriptor;
			}
			public void setScaling_group_descriptor(String scaling_group_descriptor) {
				this.scaling_group_descriptor = scaling_group_descriptor;
			}
			public String getMember_vnf_index() {
				return member_vnf_index;
			}
			public void setMember_vnf_index(String member_vnf_index) {
				this.member_vnf_index = member_vnf_index;
			}
			public String getScaling_policy() {
				return scaling_policy;
			}
			public void setScaling_policy(String scaling_policy) {
				this.scaling_policy = scaling_policy;
			}			
		}

		private String scaleVnfType;
		private String vnfInstanceId;		
		private ScaleByStepData scaleByStepData = new ScaleByStepData();

		public String getVnfInstanceId() {
			return vnfInstanceId;
		}
		public ScaleByStepData getScaleByStepData() {
			return scaleByStepData;
		}
		public void setScaleByStepData(ScaleByStepData scaleByStepData) {
			this.scaleByStepData = scaleByStepData;
		}
		public void setVnfInstanceId(String vnfInstanceId) {
			this.vnfInstanceId = vnfInstanceId;
		}
		public String getScaleVnfType() {
			return scaleVnfType;
		}
		public void setScaleVnfType(String scaleVnfType) {
			this.scaleVnfType = scaleVnfType;
		}
		
	}
	
    private String lcmOperationType; //"lcmOperationType": "scale"
    private String nsInstanceId;
	private String scaleType;
	@JsonProperty("timeout-ns-scale")	
	private String timeout_ns_scale;
	private ScaleVnfData scaleVnfData = new ScaleVnfData();
	private String scaleTime;
    
	public String getLcmOperationType() {
		return lcmOperationType;
	}

	public void setLcmOperationType(String lcmOperationType) {
		this.lcmOperationType = lcmOperationType;
	}

	public String getNsInstanceId() {
		return nsInstanceId;
	}

	public void setNsInstanceId(String nsInstanceId) {
		this.nsInstanceId = nsInstanceId;
	}

	public String toJSON()
	{
		String jsonInString=null;
		ObjectMapper mapper = new ObjectMapper();
		mapper.setSerializationInclusion(Include.NON_NULL);
		try {
			jsonInString = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(this);
		} catch (JsonProcessingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
		return jsonInString;
	}

	public String getScaleType() {
		return scaleType;
	}

	public void setScaleType(String scaleType) {
		this.scaleType = scaleType;
	}

	public String getTimeout_ns_scale() {
		return timeout_ns_scale;
	}

	public void setTimeout_ns_scale(String timeout_ns_scale) {
		this.timeout_ns_scale = timeout_ns_scale;
	}

	public ScaleVnfData getScaleVnfData() {
		return scaleVnfData;
	}

	public void setScaleVnfData(ScaleVnfData scaleVnfData) {
		this.scaleVnfData = scaleVnfData;
	}

	public String getScaleTime() {
		return scaleTime;
	}

	public void setScaleTime(String scaleTime) {
		this.scaleTime = scaleTime;
	}    
}
Loading
Loading