/bin/
/target/
/target-ide/
-/.settings/
\ No newline at end of file
+/.settings/
/target/
+/target-ide/
/bin/
/classes/
-/.settings/
+/.settings/
\ No newline at end of file
/bin/
/target/
+/target-ide/
/.settings/
-/build/
+/build/
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import java.util.HashMap;
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import org.junit.Assert;
verify(mg.getImageService(), atLeastOnce()).getImageByName(getImageNameCaptor.capture());
assertEquals(createSnapshotCaptor.getValue(), getImageNameCaptor.getValue());
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import org.junit.Assert;
verify(mg.getComputeService()).moveServer(server.getId(), "newServer1");
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.junit.Assert.assertTrue;
}
assertTrue(correctServerReturned);
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.verify;
} catch (APPCException e) {
Assert.fail("Exception during MigrateServer.executeProviderOperation");
}
- verify(mg.getComputeService()).migrateServer(mg.SERVER_ID);
+ verify(mg.getComputeService()).migrateServer(MockGenerator.SERVER_ID);
verify(server, atLeastOnce()).waitForStateChange(anyInt(), anyInt(), Matchers.anyVararg());
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import org.junit.Assert;
inOrderTest.verify(server).start();
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.inOrder;
inOrderTest.verify(server).stop();
inOrderTest.verify(server).start();
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.inOrder;
InOrder inOrderTest = inOrder(server);
inOrderTest.verify(server).unpause();
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.inOrder;
InOrder inOrderTest = inOrder(server);
inOrderTest.verify(server).unpause();
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.inOrder;
inOrderTest.verify(server).stop();
inOrderTest.verify(server).delete();
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import static org.mockito.Mockito.doReturn;
}
verify(stackService).deleteStack(stack1);
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.adapter.iaas.provider.operation.impl;
import org.junit.Assert;
verify(mg.getSvcLogicContext(), atLeastOnce()).setAttribute(Constants.STATUS_OF_VM,
"error");
}
-}
+}
\ No newline at end of file
/bin/
/classes/
/.settings/
+/target-ide/
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property.All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
import com.att.eelf.configuration.EELFLogger;
System.out.println("*************************TRACE 1*****************************");
cca.configure(key, parameters, ctx);
}
-
}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
import java.io.BufferedWriter;
}
}
-
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
import java.security.Provider;
return out;
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
public interface TelnetListener {
public void receivedString(String s);
public void filterStrings(String s1, String s2);
-}
-
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
import java.io.IOException;
public TimedOutException(String message) {
super(message);
}
-}
-
-
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.ccadaptor;
import java.util.ArrayList;
}
return s;
}
-}
+}
\ No newline at end of file
-package org.onap.appc.ccadaptor;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.Properties;\r
-\r
-import org.junit.Test;\r
-import org.onap.ccsdk.sli.core.sli.SvcLogicContext;\r
-\r
-public class TestConfigComponentAdaptor {\r
- \r
- \r
- @Test\r
- public void testGetCliRunningConfig(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("get_config_template");\r
- String key = "GetCliRunningConfig";\r
- Map<String, String> parameters = new HashMap<String, String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Get_config_template", Get_config_template);\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- \r
- }\r
- \r
- @Test\r
- public void testDownloadCliConfig(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("get_config_template");\r
- String key = "DownloadCliConfig";\r
- Map<String, String> parameters = new HashMap<String, String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Get_config_template", Get_config_template);\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- \r
- }\r
- \r
- @Test\r
- public void testXmlDownload(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("get_config_template");\r
- String key = "xml-download";\r
- Map<String, String> parameters = new HashMap<String, String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Get_config_template", Get_config_template);\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- }\r
- \r
- @Test\r
- public void testXmlGetrunningconfig(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("get_config_template");\r
- String key = "xml-getrunningconfig";\r
- Map<String, String> parameters = new HashMap<String, String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Get_config_template", Get_config_template);\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- \r
- }\r
- \r
- @Test\r
- public void testEscapeSql(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("get_config_template");\r
- String key = "escapeSql";\r
- Map<String, String> parameters = new HashMap<String, String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Get_config_template", Get_config_template);\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- }\r
- \r
- @Test\r
- public void testAll(){\r
- Properties props = null;\r
- ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);\r
- String Get_config_template = ("test");\r
- String Download_config_template = ("test");\r
- String key = "GetCliRunningConfig";\r
- Map<String, String> parameters = new HashMap<String,String>();\r
- parameters.put("Host_ip_address", "test");\r
- parameters.put("User_name", "test");\r
- parameters.put("Password", "password");\r
- parameters.put("Port_number", "22");\r
- parameters.put("Protocol", "netconf");\r
- parameters.put("Contents", "Contents");\r
- parameters.put("Get_config_template", Get_config_template);\r
- parameters.put("Download_config_template", Download_config_template);\r
- parameters.put("Config_contents", "config\nsystem\nservice-interface serv1\nipv4\ngateway-ip-address 192.168.30.44");\r
-\r
- SvcLogicContext ctx = new SvcLogicContext();\r
- ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");\r
- cca.configure(key, parameters, ctx);\r
- \r
- \r
- }\r
- \r
-\r
-}\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.ccadaptor;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
+
+public class TestConfigComponentAdaptor {
+
+
+ @Test
+ public void testGetCliRunningConfig(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("get_config_template");
+ String key = "GetCliRunningConfig";
+ Map<String, String> parameters = new HashMap<String, String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+
+ }
+
+ @Test
+ public void testDownloadCliConfig(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("get_config_template");
+ String key = "DownloadCliConfig";
+ Map<String, String> parameters = new HashMap<String, String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+
+ }
+
+ @Test
+ public void testXmlDownload(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("get_config_template");
+ String key = "xml-download";
+ Map<String, String> parameters = new HashMap<String, String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+ }
+
+ @Test
+ public void testXmlGetrunningconfig(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("get_config_template");
+ String key = "xml-getrunningconfig";
+ Map<String, String> parameters = new HashMap<String, String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+
+ }
+
+ @Test
+ public void testEscapeSql(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("get_config_template");
+ String key = "escapeSql";
+ Map<String, String> parameters = new HashMap<String, String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Get_config_template", Get_config_template);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+ }
+
+ @Test
+ public void testAll(){
+ Properties props = null;
+ ConfigComponentAdaptor cca = new ConfigComponentAdaptor(props);
+ String Get_config_template = ("test");
+ String Download_config_template = ("test");
+ String key = "GetCliRunningConfig";
+ Map<String, String> parameters = new HashMap<String,String>();
+ parameters.put("Host_ip_address", "test");
+ parameters.put("User_name", "test");
+ parameters.put("Password", "password");
+ parameters.put("Port_number", "22");
+ parameters.put("Protocol", "netconf");
+ parameters.put("Contents", "Contents");
+ parameters.put("Get_config_template", Get_config_template);
+ parameters.put("Download_config_template", Download_config_template);
+ parameters.put("Config_contents", "config\nsystem\nservice-interface serv1\nipv4\ngateway-ip-address 192.168.30.44");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("service-data.vnf-config-parameters-list.vnf-config-parameters[0].update-configuration[0].block-key-name", "test");
+ cca.configure(key, parameters, ctx);
+
+
+ }
+
+
+}
\ No newline at end of file
-package org.onap.appc.ccadaptor;\r
-\r
-import org.junit.Test;\r
-\r
-public class TestDebugLog {\r
-\r
- @Test\r
- public void testAppendToFile() {\r
- DebugLog.appendToFile("appendData");\r
- }\r
-\r
- @Test\r
- public void TestGetDateTime() {\r
- String DateTime = DebugLog.getDateTime();\r
- System.out.println(DateTime);\r
-\r
- }\r
-\r
-}\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.ccadaptor;
+
+import org.junit.Test;
+
+public class TestDebugLog {
+
+ @Test
+ public void testAppendToFile() {
+ DebugLog.appendToFile("appendData");
+ }
+
+ @Test
+ public void TestGetDateTime() {
+ String DateTime = DebugLog.getDateTime();
+ System.out.println(DateTime);
+
+ }
+
+}
\ No newline at end of file
-package org.onap.appc.ccadaptor;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-\r
-public class TestEncryptionTool {\r
-\r
- @Test\r
- public void testEncrypt() {\r
- EncryptionTool tool = EncryptionTool.getInstance();\r
- String value = tool.encrypt("encrypt");\r
- Assert.assertEquals("enc:JjEZHlg7VQ==", value);\r
- System.out.println(value);\r
- }\r
-\r
- @Test\r
- public void testDecrypt() {\r
- EncryptionTool tool = EncryptionTool.getInstance();\r
- String value = tool.decrypt("enc:JjEZHlg7VQ==");\r
- Assert.assertEquals("encrypt", value);\r
- System.out.println(value);\r
- }\r
-\r
-}\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.ccadaptor;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestEncryptionTool {
+
+ @Test
+ public void testEncrypt() {
+ EncryptionTool tool = EncryptionTool.getInstance();
+ String value = tool.encrypt("encrypt");
+ Assert.assertEquals("enc:JjEZHlg7VQ==", value);
+ System.out.println(value);
+ }
+
+ @Test
+ public void testDecrypt() {
+ EncryptionTool tool = EncryptionTool.getInstance();
+ String value = tool.decrypt("enc:JjEZHlg7VQ==");
+ Assert.assertEquals("encrypt", value);
+ System.out.println(value);
+ }
+
+}
\ No newline at end of file
-package org.onap.appc.ccadaptor;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-\r
-public class TestSshJcraftWrapper {\r
- \r
- @Test\r
- public void TestCheckIfReceivedStringMatchesDelimeter(){\r
- SshJcraftWrapper wrapper = new SshJcraftWrapper();\r
- wrapper.getTheDate();\r
- boolean result = wrapper.checkIfReceivedStringMatchesDelimeter("#", "config#", "config#");\r
- System.out.println(result);\r
- }\r
- \r
- @Test\r
- public void testRemoveWhiteSpaceAndNewLineCharactersAroundString(){\r
- SshJcraftWrapper wrapper = new SshJcraftWrapper();\r
- String nameSpace = wrapper.removeWhiteSpaceAndNewLineCharactersAroundString("namespace");\r
- Assert.assertEquals("namespace", nameSpace);\r
- }\r
- \r
-}\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.ccadaptor;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestSshJcraftWrapper {
+
+ @Test
+ public void TestCheckIfReceivedStringMatchesDelimeter(){
+ SshJcraftWrapper wrapper = new SshJcraftWrapper();
+ wrapper.getTheDate();
+ boolean result = wrapper.checkIfReceivedStringMatchesDelimeter("#", "config#", "config#");
+ System.out.println(result);
+ }
+
+ @Test
+ public void testRemoveWhiteSpaceAndNewLineCharactersAroundString(){
+ SshJcraftWrapper wrapper = new SshJcraftWrapper();
+ String nameSpace = wrapper.removeWhiteSpaceAndNewLineCharactersAroundString("namespace");
+ Assert.assertEquals("namespace", nameSpace);
+ }
+
+}
\ No newline at end of file
-package org.onap.appc.ccadaptor;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-\r
-public class TestXmlUtil {\r
-\r
- @Test\r
- public void testXml() {\r
- Map<String, String> varmap = new HashMap<String, String>();\r
- varmap.put("network.data", "ipv4");\r
- String xmlData = XmlUtil.getXml(varmap, "network");\r
- Assert.assertEquals("<data>ipv4</data>\n", xmlData);\r
- System.out.println(xmlData);\r
- }\r
-}\r
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.appc.ccadaptor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestXmlUtil {
+
+ @Test
+ public void testXml() {
+ Map<String, String> varmap = new HashMap<String, String>();
+ varmap.put("network.data", "ipv4");
+ String xmlData = XmlUtil.getXml(varmap, "network");
+ Assert.assertEquals("<data>ipv4</data>\n", xmlData);
+ System.out.println(xmlData);
+ }
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services;
import java.util.LinkedList;
registration = null;
}
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services;
public class AppcDataServiceConstant {
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services.db;
import java.util.Set;
return localContext.getAttribute("artifact-content");
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services.db;
import java.util.Map;
public class GeneralDataService {
- private static final EELFLogger log = EELFManager.getInstance().getLogger(GeneralDataService.class);
-
- public void saveTransactionLog(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException
- {
- SvcLogicContext logger = new SvcLogicContext();
- String responsePrefix = inParams.get(AppcDataServiceConstant.INPUT_PARAM_RESPONSE_PREFIX);
- String messageType = inParams.get(AppcDataServiceConstant.INPUT_PARAM_MESSAGE_TYPE);
- String message = inParams.get(AppcDataServiceConstant.INPUT_PARAM_MESSAGE);
- try
- {
-
- String escapedMessage = EscapeUtils.escapeSql(message);
- logger.setAttribute("request-id", ctx.getAttribute("request-id"));
- logger.setAttribute("log-message-type", messageType);
- logger.setAttribute("log-message", escapedMessage);
+ private static final EELFLogger log = EELFManager.getInstance().getLogger(GeneralDataService.class);
+
+ public void saveTransactionLog(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException
+ {
+ SvcLogicContext logger = new SvcLogicContext();
+ String responsePrefix = inParams.get(AppcDataServiceConstant.INPUT_PARAM_RESPONSE_PREFIX);
+ String messageType = inParams.get(AppcDataServiceConstant.INPUT_PARAM_MESSAGE_TYPE);
+ String message = inParams.get(AppcDataServiceConstant.INPUT_PARAM_MESSAGE);
+ try
+ {
+
+ String escapedMessage = EscapeUtils.escapeSql(message);
+ logger.setAttribute("request-id", ctx.getAttribute("request-id"));
+ logger.setAttribute("log-message-type", messageType);
+ logger.setAttribute("log-message", escapedMessage);
- responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
- DGGeneralDBService db = DGGeneralDBService.initialise();
- QueryStatus status = db.saveConfigTransactionLog( logger, responsePrefix);
+ responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
+ DGGeneralDBService db = DGGeneralDBService.initialise();
+ QueryStatus status = db.saveConfigTransactionLog( logger, responsePrefix);
- logger.setAttribute("log-message", null);
- logger.setAttribute("log-message-type", null);
- logger.setAttribute("request-id", null);
+ logger.setAttribute("log-message", null);
+ logger.setAttribute("log-message-type", null);
+ logger.setAttribute("request-id", null);
- if (status == QueryStatus.FAILURE)
- throw new Exception("Unable to insert into config_transaction_log");
+ if (status == QueryStatus.FAILURE)
+ throw new Exception("Unable to insert into config_transaction_log");
- }
- catch (Exception e)
- {
- ctx.setAttribute(responsePrefix + AppcDataServiceConstant.OUTPUT_PARAM_STATUS,
- AppcDataServiceConstant.OUTPUT_STATUS_FAILURE);
- ctx.setAttribute(responsePrefix + AppcDataServiceConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
- throw new SvcLogicException(e.getMessage());
- }
- }
-
-}
+ }
+ catch (Exception e)
+ {
+ ctx.setAttribute(responsePrefix + AppcDataServiceConstant.OUTPUT_PARAM_STATUS,
+ AppcDataServiceConstant.OUTPUT_STATUS_FAILURE);
+ ctx.setAttribute(responsePrefix + AppcDataServiceConstant.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
+ throw new SvcLogicException(e.getMessage());
+ }
+ }
+
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services.node;
import java.util.ArrayList;
}
return capabilityCheckNeeded;
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.data.services.utils;
import org.apache.commons.lang3.StringUtils;
public class EscapeUtils {
- public EscapeUtils() {
- // TODO Auto-generated constructor stub
- }
+ public EscapeUtils() {
+ // TODO Auto-generated constructor stub
+ }
- public static String escapeSql(String str) {
- if (str == null) {
- return null;
- }
- String searchList[] = new String[]{"'","\\"};
- String replacementList[] = new String[]{ "''","\\\\"};
- return StringUtils.replaceEach(str,searchList, replacementList);
- }
-}
+ public static String escapeSql(String str) {
+ if (str == null) {
+ return null;
+ }
+ String searchList[] = new String[]{"'","\\"};
+ String replacementList[] = new String[]{ "''","\\\\"};
+ return StringUtils.replaceEach(str,searchList, replacementList);
+ }
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.encryptiontool;
import java.util.LinkedList;
registration = null;
}
}
-}
+}
\ No newline at end of file
/*-
* ============LICENSE_START=======================================================
- * ONAP : APP-C
+ * ONAP : APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
* 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
* ============LICENSE_END=========================================================
*/
-
package org.onap.appc.encryptiontool.wrapper;
public class Constants
private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
public static final String APPC_CONFIG_DIR="/opt/onap/appc/data/properties";
-}
+}
\ No newline at end of file
.classpath
.project
.settings/
+/target-ide/
# Maven
log/
-target/
+target/
\ No newline at end of file
-# Target dirs in all projects\r
-**/target/*\r
-\r
-# Added for Intellij IDEA IDE\r
-**/.idea/*\r
-*.iml\r
-\r
-# Generated models and features\r
-**/bin/*\r
-\r
-# MANIFEST.MF is updated on every clean install\r
-**/src/main/resources/META-INF/\r
-**/pom.xml.versionsBackup\r
-pom.xml.versionsBackup\r
-\r
-.project\r
-\r
-*.prefs\r
-.classpath\r
-**/.classpath\r
-/target/\r
-logs/\r
-debug-logs/\r
-/.settings/\r
-**/*.iml\r
-/.idea/\r
-\r
-\r
-# MANIFEST.MF is updated on every clean install\r
-**/src/main/resources/META-INF/\r
-**/src/main/yang-gen-sal\r
-**/src/main/yang-gen-config\r
+# Target dirs in all projects
+**/target/*
+
+# Added for Intellij IDEA IDE
+**/.idea/*
+*.iml
+
+# Generated models and features
+**/bin/*
+
+# MANIFEST.MF is updated on every clean install
+**/src/main/resources/META-INF/
+**/pom.xml.versionsBackup
+pom.xml.versionsBackup
+
+.project
+
+*.prefs
+.classpath
+**/.classpath
+/target/
+logs/
+debug-logs/
+/.settings/
+**/*.iml
+/.idea/
+.settings
+
+
+# MANIFEST.MF is updated on every clean install
+**/src/main/resources/META-INF/
+**/src/main/yang-gen-sal
+**/src/main/yang-gen-config
\ No newline at end of file
/target/
+/target-ide/
\ No newline at end of file
/target/
/.classpath
+/target-ide/
\ No newline at end of file
/target/
/.classpath
+/target-ide/
\ No newline at end of file
/target/
+/target-ide/
\ No newline at end of file
/target/
+/target-ide/
\ No newline at end of file
/target/
+/target-ide/
\ No newline at end of file
/target/
+/target-ide/
+.settings
\ No newline at end of file
/target/
+/target-ide/
+/.settings/
\ No newline at end of file
/target/
+/target-ide/
\ No newline at end of file
/target/
+/target-ide/
/bin/
/.settings/
-**/yang-gen-config/
+**/yang-gen-config/
\ No newline at end of file
<artifactId>json</artifactId>
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
/target/
/bin/
/.settings/
+/target-ide/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017 Amdocs
+ ================================================================================
+ 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
</plugins>
</build>
-</project>
+</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017 Amdocs
+ ================================================================================
+ 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
/target/
+/target-ide/
/bin/
-/.settings/
+/.settings/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017 Amdocs
+ ================================================================================
+ 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>ietf-yang-types</artifactId>
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017 Amdocs
+ ================================================================================
+ 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.sdc.artifacts.impl;
import org.junit.Assert;
return serviceArtifacts;
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.sdc.artifacts.impl;
import org.junit.Before;
serviceArtifacts.add(artifactInfo);
return serviceArtifacts;
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.sdc.listener;
import org.junit.Assert;
}
-}
+}
\ No newline at end of file
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
package org.onap.appc.sdc.listener;
import org.junit.Assert;
}
return new String(bFile);
}
-}
+}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017 Amdocs
+ ================================================================================
+ 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>1.4.196</version>
</dependency>
</dependencies>
-</project>
+</project>
\ No newline at end of file