mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Fix RAT
This commit is contained in:
		
							parent
							
								
									e9c9887ee0
								
							
						
					
					
						commit
						3f49f8ca61
					
				| @ -1,3 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.lifecylce; | package org.apache.cloudstack.storage.datastore.lifecylce; | ||||||
| 
 | 
 | ||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| @ -6,25 +24,24 @@ import java.util.Map; | |||||||
| 
 | 
 | ||||||
| import javax.inject.Inject; | import javax.inject.Inject; | ||||||
| 
 | 
 | ||||||
| import com.cloud.dc.DataCenterVO; | import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; | ||||||
| import com.cloud.host.HostVO; | import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; | ||||||
| import com.cloud.resource.ResourceManager; | import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; | ||||||
| import com.cloud.storage.StorageManager; | import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle; | ||||||
| import com.cloud.storage.StoragePoolAutomation; | import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters; | ||||||
|  | import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; | ||||||
| import org.apache.cloudstack.storage.datastore.util.NexentaUtil; | import org.apache.cloudstack.storage.datastore.util.NexentaUtil; | ||||||
| import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; | import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; | ||||||
| import org.apache.log4j.Logger; | import org.apache.log4j.Logger; | ||||||
| 
 | 
 | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; |  | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle; |  | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters; |  | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; |  | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; |  | ||||||
| import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; |  | ||||||
| 
 |  | ||||||
| import com.cloud.dc.dao.DataCenterDao; |  | ||||||
| import com.cloud.agent.api.StoragePoolInfo; | import com.cloud.agent.api.StoragePoolInfo; | ||||||
|  | import com.cloud.dc.DataCenterVO; | ||||||
|  | import com.cloud.dc.dao.DataCenterDao; | ||||||
|  | import com.cloud.host.HostVO; | ||||||
| import com.cloud.hypervisor.Hypervisor; | import com.cloud.hypervisor.Hypervisor; | ||||||
|  | import com.cloud.resource.ResourceManager; | ||||||
|  | import com.cloud.storage.StorageManager; | ||||||
|  | import com.cloud.storage.StoragePoolAutomation; | ||||||
| 
 | 
 | ||||||
| public class NexentaPrimaryDataStoreLifeCycle | public class NexentaPrimaryDataStoreLifeCycle | ||||||
|         implements PrimaryDataStoreLifeCycle { |         implements PrimaryDataStoreLifeCycle { | ||||||
|  | |||||||
| @ -1,3 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.provider; | package org.apache.cloudstack.storage.datastore.provider; | ||||||
| 
 | 
 | ||||||
| import org.apache.log4j.Logger; | import org.apache.log4j.Logger; | ||||||
|  | |||||||
| @ -1,3 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.util; | package org.apache.cloudstack.storage.datastore.util; | ||||||
| 
 | 
 | ||||||
| import java.io.BufferedReader; | import java.io.BufferedReader; | ||||||
| @ -13,11 +31,6 @@ import javax.net.ssl.SSLContext; | |||||||
| import javax.net.ssl.TrustManager; | import javax.net.ssl.TrustManager; | ||||||
| import javax.net.ssl.X509TrustManager; | import javax.net.ssl.X509TrustManager; | ||||||
| 
 | 
 | ||||||
| import com.google.gson.Gson; |  | ||||||
| import com.google.gson.annotations.SerializedName; |  | ||||||
| 
 |  | ||||||
| import com.cloud.utils.exception.CloudRuntimeException; |  | ||||||
| 
 |  | ||||||
| import org.apache.http.HttpResponse; | import org.apache.http.HttpResponse; | ||||||
| import org.apache.http.auth.AuthScope; | import org.apache.http.auth.AuthScope; | ||||||
| import org.apache.http.auth.UsernamePasswordCredentials; | import org.apache.http.auth.UsernamePasswordCredentials; | ||||||
| @ -32,6 +45,10 @@ import org.apache.http.impl.client.DefaultHttpClient; | |||||||
| import org.apache.http.impl.conn.BasicClientConnectionManager; | import org.apache.http.impl.conn.BasicClientConnectionManager; | ||||||
| import org.apache.log4j.Logger; | import org.apache.log4j.Logger; | ||||||
| 
 | 
 | ||||||
|  | import com.cloud.utils.exception.CloudRuntimeException; | ||||||
|  | import com.google.gson.Gson; | ||||||
|  | import com.google.gson.annotations.SerializedName; | ||||||
|  | 
 | ||||||
| public class NexentaNmsClient { | public class NexentaNmsClient { | ||||||
|     private static final Logger logger = Logger.getLogger(NexentaNmsClient.class); |     private static final Logger logger = Logger.getLogger(NexentaNmsClient.class); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,15 +1,32 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.util; | package org.apache.cloudstack.storage.datastore.util; | ||||||
| 
 | 
 | ||||||
| import java.util.HashMap; | import java.util.HashMap; | ||||||
| import java.util.LinkedList; | import java.util.LinkedList; | ||||||
| 
 | 
 | ||||||
| import com.google.gson.annotations.SerializedName; | import org.apache.cloudstack.storage.datastore.util.NexentaNmsClient.NmsResponse; | ||||||
| import org.apache.log4j.LogManager; | import org.apache.log4j.LogManager; | ||||||
| import org.apache.log4j.Logger; | import org.apache.log4j.Logger; | ||||||
| 
 | 
 | ||||||
| import org.apache.cloudstack.storage.datastore.util.NexentaNmsClient.NmsResponse; |  | ||||||
| 
 |  | ||||||
| import com.cloud.utils.exception.CloudRuntimeException; | import com.cloud.utils.exception.CloudRuntimeException; | ||||||
|  | import com.google.gson.annotations.SerializedName; | ||||||
| 
 | 
 | ||||||
| public class NexentaStorAppliance { | public class NexentaStorAppliance { | ||||||
|     private static final Logger logger = LogManager.getLogger(NexentaStorAppliance.class); |     private static final Logger logger = LogManager.getLogger(NexentaStorAppliance.class); | ||||||
|  | |||||||
| @ -1,3 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.util; | package org.apache.cloudstack.storage.datastore.util; | ||||||
| 
 | 
 | ||||||
| import static org.apache.cloudstack.storage.datastore.util.NexentaStorAppliance.IscsiTarget; | import static org.apache.cloudstack.storage.datastore.util.NexentaStorAppliance.IscsiTarget; | ||||||
|  | |||||||
| @ -1,3 +1,21 @@ | |||||||
|  | /* | ||||||
|  |  * Licensed to the Apache Software Foundation (ASF) under one | ||||||
|  |  * or more contributor license agreements.  See the NOTICE file | ||||||
|  |  * distributed with this work for additional information | ||||||
|  |  * regarding copyright ownership.  The ASF licenses this file | ||||||
|  |  * to you under the Apache License, Version 2.0 (the | ||||||
|  |  * "License"); you may not use this file except in compliance | ||||||
|  |  * with the License.  You may obtain a copy of the License at | ||||||
|  |  * | ||||||
|  |  *   http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  * | ||||||
|  |  * Unless required by applicable law or agreed to in writing, | ||||||
|  |  * software distributed under the License is distributed on an | ||||||
|  |  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||
|  |  * KIND, either express or implied.  See the License for the | ||||||
|  |  * specific language governing permissions and limitations | ||||||
|  |  * under the License. | ||||||
|  |  */ | ||||||
| package org.apache.cloudstack.storage.datastore.util; | package org.apache.cloudstack.storage.datastore.util; | ||||||
| 
 | 
 | ||||||
| import static junit.framework.Assert.assertNull; | import static junit.framework.Assert.assertNull; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user