1 | /** |
2 | * |
3 | * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> |
4 | * |
5 | * ==================================================================== |
6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
7 | * you may not use this file except in compliance with the License. |
8 | * You may obtain a copy of the License at |
9 | * |
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
11 | * |
12 | * Unless required by applicable law or agreed to in writing, software |
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * See the License for the specific language governing permissions and |
16 | * limitations under the License. |
17 | * ==================================================================== |
18 | */ |
19 | package org.jclouds.cloudservers.compute.config; |
20 | |
21 | import org.jclouds.compute.config.BindComputeStrategiesByClass; |
22 | import org.jclouds.compute.strategy.CreateNodeWithGroupEncodedIntoName; |
23 | import org.jclouds.compute.strategy.DestroyNodeStrategy; |
24 | import org.jclouds.compute.strategy.GetNodeMetadataStrategy; |
25 | import org.jclouds.compute.strategy.ListNodesStrategy; |
26 | import org.jclouds.compute.strategy.RebootNodeStrategy; |
27 | import org.jclouds.compute.strategy.ResumeNodeStrategy; |
28 | import org.jclouds.compute.strategy.SuspendNodeStrategy; |
29 | import org.jclouds.cloudservers.compute.strategy.CloudServersCreateNodeWithGroupEncodedIntoName; |
30 | import org.jclouds.cloudservers.compute.strategy.CloudServersDestroyNodeStrategy; |
31 | import org.jclouds.cloudservers.compute.strategy.CloudServersGetNodeMetadataStrategy; |
32 | import org.jclouds.cloudservers.compute.strategy.CloudServersListNodesStrategy; |
33 | import org.jclouds.cloudservers.compute.strategy.CloudServersLifeCycleStrategy; |
34 | |
35 | /** |
36 | * |
37 | * @author Adrian Cole |
38 | * |
39 | */ |
40 | public class CloudServersBindComputeStrategiesByClass extends BindComputeStrategiesByClass { |
41 | |
42 | @Override |
43 | protected Class<? extends CreateNodeWithGroupEncodedIntoName> defineAddNodeWithTagStrategy() { |
44 | return CloudServersCreateNodeWithGroupEncodedIntoName.class; |
45 | } |
46 | |
47 | @Override |
48 | protected Class<? extends DestroyNodeStrategy> defineDestroyNodeStrategy() { |
49 | return CloudServersDestroyNodeStrategy.class; |
50 | } |
51 | |
52 | @Override |
53 | protected Class<? extends GetNodeMetadataStrategy> defineGetNodeMetadataStrategy() { |
54 | return CloudServersGetNodeMetadataStrategy.class; |
55 | } |
56 | |
57 | @Override |
58 | protected Class<? extends ListNodesStrategy> defineListNodesStrategy() { |
59 | return CloudServersListNodesStrategy.class; |
60 | } |
61 | |
62 | @Override |
63 | protected Class<? extends RebootNodeStrategy> defineRebootNodeStrategy() { |
64 | return CloudServersLifeCycleStrategy.class; |
65 | } |
66 | |
67 | @Override |
68 | protected Class<? extends ResumeNodeStrategy> defineStartNodeStrategy() { |
69 | return CloudServersLifeCycleStrategy.class; |
70 | } |
71 | |
72 | @Override |
73 | protected Class<? extends SuspendNodeStrategy> defineStopNodeStrategy() { |
74 | return CloudServersLifeCycleStrategy.class; |
75 | } |
76 | } |