private String load(String dirPath) {
- String url = "http://uui-nlp.onap:33011/api/online/load";
+ String url = "http://uui-nlp:33011/api/online/load";
HashMap<String, String> headers = new HashMap<>();
String bodyStr = "{" + "\"path\": \""+dirPath+"\"" + "}";
logger.info("request body: " + bodyStr);
throw new RuntimeException("The active model file does not support parsing the current text");
}
- String url = "http://uui-nlp.onap:33011/api/online/predict";
+ String url = "http://uui-nlp:33011/api/online/predict";
HashMap<String, String> headers = new HashMap<>();
String bodyStr = "{\"title\": \"predict\", \"text\": \"" + text
+ "\"}";
public interface IntentApiService {
@Headers({
- "X-TransactionId: 9999",
- "X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
@POST("/so/infra/serviceIntent/v1/create")
@Headers({
"X-TransactionId: 9999",
"X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
@GET("/aai/v24/business/customers/customer/IBNCustomer/service-subscriptions/service-subscription/IBN/service-instances/service-instance/{resource-service-id}?depth=all")
@Headers({
"X-TransactionId: 9999",
"X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
@GET("/aai/v24/network/network-policies/network-policy/{networkPolicyId}?depth=all")
@Headers({
"X-TransactionId: 9999",
"X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
@GET("/aai/v24/business/customers/customer/IBNCustomer/service-subscriptions/service-subscription/IBN/service-instances/service-instance/{resource-service-id}/metadata")
Call<JSONObject> getInstanceBandwidth(@Path("resource-service-id") String resourceServiceId);
@Headers({
- "X-TransactionId: 9999",
- "X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
- @POST("/so/infra/serviceIntent/v1/delete")
+ @DELETE("/so/infra/serviceIntent/v1/delete")
Call<JSONObject> deleteIntentInstance(@Body RequestBody body);
@Headers({
"X-TransactionId: 9999",
"X-FromAppId: MSO",
- "Authorization: Basic QUFJOkFBSQ==",
+ "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
"Accept: application/json"
})
- @POST("/aai/v24/network/network-routes")
+ @GET("/aai/v24/network/network-routes")
Call<JSONObject> queryNetworkRoute();
}
Map<String, Object> result = new HashMap<>();
List<String> accessNodeList = new ArrayList<>();
List<String> cloudAccessNodeList = new ArrayList<>();
- JSONObject body = intentApiService.queryNetworkRoute().execute().body();
- JSONArray data = body.getJSONArray("data");
+ Response<JSONObject> response = intentApiService.queryNetworkRoute().execute();
+ JSONObject body = response.body();
+ JSONArray data = body.getJSONArray("network-route");
for (int i = 0; i<data.size(); i++) {
JSONObject nodeInfo = data.getJSONObject(i);
if ("ROOT".equals(nodeInfo.getString("type"))) {
CREATE TABLE instance_performance
(
id integer not null,
- job_id varchar(32),
- resource_instance_id varchar(64),
+ job_id varchar(36),
+ resource_instance_id varchar(36),
bandwidth numeric,
date date,
max_bandwidth numeric,
constraint intent_instance_pk
primary key,
instance_id varchar(16),
- job_id varchar(16),
+ job_id varchar(36),
progress integer,
status char,
- resource_instance_id varchar(16),
+ resource_instance_id varchar(36),
name varchar(255),
cloud_point_name varchar(255),
access_point_one_name varchar(255),
create_time varchar(100) default NULL::character varying,
size numeric(10, 3),
active integer,
- "modelType" integer default 0
+ model_type integer default 0
);