+++ /dev/null
-/*******************************************************************************\r
- * ============LICENSE_START====================================================\r
- * * org.onap.aaf\r
- * * ===========================================================================\r
- * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
- * * ===========================================================================\r
- * * Licensed under the Apache License, Version 2.0 (the "License");\r
- * * you may not use this file except in compliance with the License.\r
- * * You may obtain a copy of the License at\r
- * * \r
- * * http://www.apache.org/licenses/LICENSE-2.0\r
- * * \r
- * * Unless required by applicable law or agreed to in writing, software\r
- * * distributed under the License is distributed on an "AS IS" BASIS,\r
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * * See the License for the specific language governing permissions and\r
- * * limitations under the License.\r
- * * ============LICENSE_END====================================================\r
- * *\r
- * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
- * *\r
- ******************************************************************************/\r
-package org.onap.aaf.client.test;\r
-\r
-import java.net.URI;\r
-import java.util.Properties;\r
-\r
-import org.onap.aaf.cadi.Access;\r
-import org.onap.aaf.cadi.client.Future;\r
-import org.onap.aaf.cadi.dme2.DME2ClientSS;\r
-import org.onap.aaf.cadi.dme2.DRcli;\r
-\r
-import com.att.aft.dme2.api.DME2Manager;\r
-\r
-public class JU_TestDME2RcliClient {\r
- public static void main(String[] args) {\r
- try {\r
- Properties props = System.getProperties();\r
- props.put("AFT_LATITUDE","32.780140");\r
- props.put("AFT_LONGITUDE","-96.800451");\r
- props.put("AFT_ENVIRONMENT","AFTUAT");\r
-// props.put("DME2_EP_REGISTRY_CLASS","DME2FS");\r
-// props.put("AFT_DME2_EP_REGISTRY_FS_DIR","/Volumes/Data/src/authz/dme2reg");\r
-\r
- props.put("cadi_keystore","/Volumes/Data/src/authz/common/aaf.att.jks");\r
- props.put("cadi_keystore_password","enc:???");\r
- props.put("cadi_truststore","/Volumes/Data/src/authz/common/truststore.jks");\r
- props.put("cadi_truststore_password","enc:???");\r
- props.put("cadi_keyfile", "/Volumes/Data/src/authz/common/keyfile");\r
- \r
- // Local Testing on dynamic IP PC ***ONLY***\r
-// props.put("cadi_trust_all_x509", "true"); \r
- \r
- \r
- \r
- URI uri = new URI("https://DME2RESOLVE/service=com.att.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE");\r
- \r
- Access access = new JU_TestAccess();\r
- DME2Manager dm = new DME2Manager("DME2Manager TestHClient",props);\r
- DRcli client = new DRcli(\r
- uri, \r
- new DME2ClientSS(access,"XX@NS","enc:???"));\r
- \r
- client.setManager(dm)\r
- .apiVersion("2.0")\r
- .readTimeout(3000);\r
- \r
- Future<String> ft = client.read("/authz/nss/com.att.aaf","text/json"); \r
- if(ft.get(10000)) {\r
- System.out.println("Hurray,\n"+ft.body());\r
- } else {\r
- System.out.println("not quite: " + ft.code());\r
- }\r
- } catch (Exception e) {\r
- e.printStackTrace();\r
- }\r
- }\r
- \r
-}\r