Skip to content
This repository was archived by the owner on Jan 15, 2020. It is now read-only.

Commit 68b8891

Browse files
author
Alex Huang
committed
Removed all reminants of the IdentityService. Created the KeysManager to move the management
of keys out of management server
1 parent 2893120 commit 68b8891

File tree

36 files changed

+338
-758
lines changed

36 files changed

+338
-758
lines changed

api/src/com/cloud/server/ResourceTag.java

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,49 @@ public interface ResourceTag extends ControlledEntity, Identity, InternalIdentit
2424

2525
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
2626
public enum ResourceObjectType {
27-
UserVm(true, true), Template(true, true), ISO(true, false), Volume(true, true), Snapshot(true, false), Network(true, true), Nic(false, true), LoadBalancer(true, true), PortForwardingRule(
28-
true, true), FirewallRule(true, true), SecurityGroup(true, false), PublicIpAddress(true, true), Project(true, false), Vpc(true, true), NetworkACL(true, true), StaticRoute(
29-
true, false), VMSnapshot(true, false), RemoteAccessVpn(true, true), Zone(false, true), ServiceOffering(false, true), Storage(false, true), PrivateGateway(false,
30-
true), NetworkACLList(false, true), VpnGateway(false, true), CustomerGateway(false, true), VpnConnection(false, true), User(true, true), DiskOffering(false, true);
27+
UserVm(true, true),
28+
Template(true, true),
29+
ISO(true, false),
30+
Volume(true, true),
31+
Snapshot(true, false),
32+
Network(true, true),
33+
Nic(false, true),
34+
LoadBalancer(true, true),
35+
PortForwardingRule(true, true),
36+
FirewallRule(true, true),
37+
SecurityGroup(true, false),
38+
PublicIpAddress(true, true),
39+
Project(true, false),
40+
Vpc(true, true),
41+
NetworkACL(true, true),
42+
StaticRoute(true, false),
43+
VMSnapshot(true, false),
44+
RemoteAccessVpn(true, true),
45+
Zone(false, true),
46+
ServiceOffering(false, true),
47+
Storage(false, true),
48+
PrivateGateway(false, true),
49+
NetworkACLList(false, true),
50+
VpnGateway(false, true),
51+
CustomerGateway(false, true),
52+
VpnConnection(false, true),
53+
User(true, true),
54+
DiskOffering(false, true);
3155

3256
ResourceObjectType(boolean resourceTagsSupport, boolean resourceMetadataSupport) {
3357
this.resourceTagsSupport = resourceTagsSupport;
34-
this.metadataSupport = resourceMetadataSupport;
58+
metadataSupport = resourceMetadataSupport;
3559
}
3660

3761
private final boolean resourceTagsSupport;
3862
private final boolean metadataSupport;
3963

4064
public boolean resourceTagsSupport() {
41-
return this.resourceTagsSupport;
65+
return resourceTagsSupport;
4266
}
4367

4468
public boolean resourceMetadataSupport() {
45-
return this.metadataSupport;
69+
return metadataSupport;
4670
}
4771
}
4872

api/src/org/apache/cloudstack/api/BaseCmd.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@
2626

2727
import javax.inject.Inject;
2828

29+
import org.apache.log4j.Logger;
30+
2931
import org.apache.cloudstack.affinity.AffinityGroupService;
3032
import org.apache.cloudstack.alert.AlertService;
3133
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
3234
import org.apache.cloudstack.network.lb.ApplicationLoadBalancerService;
3335
import org.apache.cloudstack.network.lb.InternalLoadBalancerVMService;
3436
import org.apache.cloudstack.query.QueryService;
3537
import org.apache.cloudstack.usage.UsageService;
36-
import org.apache.log4j.Logger;
3738

3839
import com.cloud.configuration.ConfigurationService;
3940
import com.cloud.domain.Domain;
@@ -153,8 +154,6 @@ public enum HTTPMethod {
153154
@Inject
154155
public ResourceLimitService _resourceLimitService;
155156
@Inject
156-
public IdentityService _identityService;
157-
@Inject
158157
public StorageNetworkService _storageNetworkService;
159158
@Inject
160159
public TaggedResourceService _taggedResourceService;
@@ -358,11 +357,11 @@ public static boolean isRootAdmin(short accountType) {
358357
}
359358

360359
public void setFullUrlParams(Map<String, String> map) {
361-
this.fullUrlParams = map;
360+
fullUrlParams = map;
362361
}
363362

364363
public Map<String, String> getFullUrlParams() {
365-
return this.fullUrlParams;
364+
return fullUrlParams;
366365
}
367366

368367
public Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly) {

api/src/org/apache/cloudstack/api/IdentityService.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

awsapi/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@
223223
<dependency>
224224
<groupId>org.slf4j</groupId>
225225
<artifactId>slf4j-api</artifactId>
226-
<version>1.6.1</version>
227226
<scope>runtime</scope>
228227
</dependency>
229228
<dependency>
@@ -271,8 +270,6 @@
271270
<dependency>
272271
<groupId>org.bouncycastle</groupId>
273272
<artifactId>bcprov-jdk16</artifactId>
274-
<!-- TODO: do we need this explicit version override? -->
275-
<version>1.45</version>
276273
<scope>runtime</scope>
277274
</dependency>
278275
<dependency>
@@ -320,7 +317,6 @@
320317
<plugin>
321318
<groupId>org.apache.maven.plugins</groupId>
322319
<artifactId>maven-checkstyle-plugin</artifactId>
323-
<version>${cs.checkstyle.version}</version>
324320
<executions>
325321
<execution>
326322
<phase>none</phase>

deps/XenServerJava/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>${cs.checkstyle.version}</version>
4443
<executions>
4544
<execution>
4645
<phase>none</phase>

engine/schema/resources/META-INF/cloudstack/core/spring-engine-schema-core-daos-context.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
<bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
172172
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
173173
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
174-
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
175174
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
176175
<bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" />
177176
<bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />

engine/storage/integration-test/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@
119119
<dependency>
120120
<groupId>org.apache.httpcomponents</groupId>
121121
<artifactId>httpclient</artifactId>
122-
<!-- TODO: Is this version override required -->
123-
<version>4.2.2</version>
124122
<scope>compile</scope>
125123
</dependency>
126124
<dependency>

framework/config/src/org/apache/cloudstack/framework/config/ConfigDepot.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ public interface ConfigDepot {
2727
ConfigKey<?> get(String paramName);
2828

2929
Set<ConfigKey<?>> getConfigListByScope(String scope);
30+
31+
<T> void set(ConfigKey<T> key, T value);
3032
}

framework/config/src/org/apache/cloudstack/framework/config/impl/ConfigDepotImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public List<ScopedConfigStorage> getScopedStorages() {
172172

173173
@Inject
174174
public void setScopedStorages(List<ScopedConfigStorage> scopedStorages) {
175-
this._scopedStorages = scopedStorages;
175+
_scopedStorages = scopedStorages;
176176
}
177177

178178
public List<Configurable> getConfigurables() {
@@ -181,12 +181,16 @@ public List<Configurable> getConfigurables() {
181181

182182
@Inject
183183
public void setConfigurables(List<Configurable> configurables) {
184-
this._configurables = configurables;
184+
_configurables = configurables;
185185
}
186186

187187
@Override
188188
public Set<ConfigKey<?>> getConfigListByScope(String scope) {
189189
return _scopeLevelConfigsMap.get(ConfigKey.Scope.valueOf(scope));
190190
}
191191

192+
@Override
193+
public <T> void set(ConfigKey<T> key, T value) {
194+
_configDao.update(key.key(), value.toString());
195+
}
192196
}

framework/security/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<artifactId>cloudstack-framework</artifactId>
2626
<version>4.4.0-SNAPSHOT</version>
2727
<relativePath>../pom.xml</relativePath>
28-
</parent>
28+
</parent>
2929
<dependencies>
3030
<dependency>
3131
<groupId>org.apache.cloudstack</groupId>
@@ -42,6 +42,10 @@
4242
<artifactId>cloud-framework-ipc</artifactId>
4343
<version>${project.version}</version>
4444
</dependency>
45+
<dependency>
46+
<groupId>commons-codec</groupId>
47+
<artifactId>commons-codec</artifactId>
48+
</dependency>
4549
<dependency>
4650
<groupId>org.apache.cloudstack</groupId>
4751
<artifactId>cloud-framework-db</artifactId>
@@ -51,6 +55,6 @@
5155
<groupId>org.apache.cloudstack</groupId>
5256
<artifactId>cloud-framework-config</artifactId>
5357
<version>${project.version}</version>
54-
</dependency>
58+
</dependency>
5559
</dependencies>
5660
</project>

0 commit comments

Comments
 (0)