| 501 |
jeje |
1 |
/**
|
|
|
2 |
* Elastic Grid
|
| 530 |
jeje |
3 |
* Copyright (C) 2008-2010 Elastic Grid, LLC.
|
|
|
4 |
*
|
| 501 |
jeje |
5 |
* This program is free software: you can redistribute it and/or modify
|
|
|
6 |
* it under the terms of the GNU Affero General Public License as
|
|
|
7 |
* published by the Free Software Foundation, either version 3 of the
|
|
|
8 |
* License, or (at your option) any later version.
|
| 530 |
jeje |
9 |
*
|
| 501 |
jeje |
10 |
* This program is distributed in the hope that it will be useful,
|
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
13 |
* GNU Affero General Public License for more details.
|
| 530 |
jeje |
14 |
*
|
| 501 |
jeje |
15 |
* You should have received a copy of the GNU Affero General Public License
|
|
|
16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
17 |
*/
|
|
|
18 |
package com.elasticgrid.model.rackspace.impl;
|
|
|
19 |
|
|
|
20 |
import com.elasticgrid.model.NodeProfile;
|
|
|
21 |
import com.elasticgrid.model.rackspace.CloudServersNode;
|
|
|
22 |
import com.elasticgrid.model.rackspace.CloudServersNodeType;
|
|
|
23 |
import com.elasticgrid.model.ec2.EC2Node;
|
|
|
24 |
import com.elasticgrid.model.ec2.EC2NodeType;
|
|
|
25 |
import com.elasticgrid.model.internal.AbstractNode;
|
|
|
26 |
|
|
|
27 |
/**
|
|
|
28 |
* @author Jerome Bernard
|
|
|
29 |
*/
|
|
|
30 |
public class CloudServersNodeImpl extends AbstractNode implements CloudServersNode {
|
|
|
31 |
private String serverID;
|
|
|
32 |
private CloudServersNodeType type;
|
|
|
33 |
|
|
|
34 |
public CloudServersNodeImpl() {
|
|
|
35 |
super();
|
|
|
36 |
}
|
|
|
37 |
|
|
|
38 |
public CloudServersNodeImpl(NodeProfile profile, CloudServersNodeType type) {
|
|
|
39 |
super(profile);
|
|
|
40 |
setType(type);
|
|
|
41 |
}
|
|
|
42 |
|
| 512 |
jeje |
43 |
public String getID() {
|
|
|
44 |
return getServerID();
|
|
|
45 |
}
|
|
|
46 |
|
| 501 |
jeje |
47 |
public String getServerID() {
|
|
|
48 |
return serverID;
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
public void setServerID(String serverID) {
|
|
|
52 |
this.serverID = serverID;
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
public CloudServersNode serverID(String serverID) {
|
|
|
56 |
this.serverID = serverID;
|
|
|
57 |
return this;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
public CloudServersNodeType getType() {
|
|
|
61 |
return type;
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
public void setType(CloudServersNodeType type) {
|
|
|
65 |
this.type = type;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
public String toString() {
|
|
|
69 |
final StringBuilder sb = new StringBuilder();
|
|
|
70 |
sb.append("CloudServersNodeImpl");
|
|
|
71 |
sb.append("{serverID='").append(serverID).append('\'');
|
|
|
72 |
sb.append('}');
|
|
|
73 |
return sb.toString();
|
|
|
74 |
}
|
|
|
75 |
}
|