cd47e1937a4258ff86dd4de10d0c47583554fff4
[so.git] / cloudify-client / src / main / java / org / onap / so / cloudify / v3 / client / Cloudify.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.cloudify.v3.client;
22
23 import org.onap.so.cloudify.base.client.CloudifyClient;
24 import org.onap.so.cloudify.base.client.CloudifyClientConnector;
25
26 /**
27  * Reference: http://docs.getcloudify.org/api/v3/
28  */
29 public class Cloudify extends CloudifyClient {
30
31     private final DeploymentsResource deployments;
32     private final BlueprintsResource blueprints;
33     private final TokensResource tokens;
34     private final NodeInstancesResource nodeInstances;
35     private final ExecutionsResource executions;
36
37 /* Not supporting dynamic connectors
38     public Cloudify(String endpoint, CloudifyClientConnector connector) {
39         super(endpoint, connector);
40         deployments = new DeploymentsResource(this);
41         blueprints = new BlueprintsResource(this);
42         nodeInstances = new NodeInstancesResource(this);
43         tokens = new TokensResource(this);
44     }
45 */
46     public Cloudify(String endpoint, String tenant) {
47         super(endpoint, tenant);
48         deployments = new DeploymentsResource(this);
49         blueprints = new BlueprintsResource(this);
50         nodeInstances = new NodeInstancesResource(this);
51         executions = new ExecutionsResource(this);
52         tokens = new TokensResource(this);
53     }
54
55     public Cloudify(String endpoint) {
56         super(endpoint);
57         deployments = new DeploymentsResource(this);
58         blueprints = new BlueprintsResource(this);
59         nodeInstances = new NodeInstancesResource(this);
60         executions = new ExecutionsResource(this);
61         tokens = new TokensResource(this);
62     }
63
64     public DeploymentsResource deployments() {
65         return this.deployments;
66     }
67
68     public BlueprintsResource blueprints() {
69         return this.blueprints;
70     }
71
72     public NodeInstancesResource nodeInstances() {
73         return this.nodeInstances;
74     }
75
76     public ExecutionsResource executions() {
77         return this.executions;
78     }
79
80     public TokensResource tokens() {
81         return this.tokens;
82     }
83 }