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

Commit 8bc768f

Browse files
committed
Updated package names so they don't collide with the Azure SDK
1 parent ffee6fe commit 8bc768f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+131
-113
lines changed

Diff for: findbugs-exclude.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<FindBugsFilter>
22
<Match>
33
<!--
4-
Transient field that isn't set by deserialization.
4+
Transient field that isn't set by deserialization.
55
This class contains a field that is updated at multiple places in the class, thus it seems to be part of the state of the class.
6-
However, since the field is marked as transient and not set in readObject or readResolve, it will contain the default value in any deserialized instance of the class.
6+
However, since the field is marked as transient and not set in readObject or readResolve, it will contain the default value in any deserialized instance of the class.
77
Bug kind and pattern: Se - SE_TRANSIENT_FIELD_NOT_RESTORED
88
-->
9-
<Class name="com.microsoft.azure.AzureVMAgent" />
9+
<Class name="com.microsoft.azure.vmagent.AzureVMAgent" />
1010
<Field name="credentials" />
1111
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
1212
</Match>
@@ -22,7 +22,7 @@
2222
See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.
2323
-->
2424
<!-- The issue was fixed, but the error is still there -->
25-
<Class name="com.microsoft.azure.AzureVMManagementServiceDelegate" />
25+
<Class name="com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate" />
2626
<Method name="createDeployment"/>
2727
<Bug pattern="OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE" />
2828
</Match>

Diff for: src/main/java/com/microsoft/azure/AzureVMAgent.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMAgent.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
import com.microsoft.azure.management.compute.OperatingSystemTypes;
1919
import java.io.IOException;
@@ -25,10 +25,10 @@
2525

2626
import org.kohsuke.stapler.DataBoundConstructor;
2727

28-
import com.microsoft.azure.util.Constants;
29-
import com.microsoft.azure.util.CleanUpAction;
30-
import com.microsoft.azure.remote.AzureVMAgentSSHLauncher;
31-
import com.microsoft.azure.util.AzureCredentials;
28+
import com.microsoft.azure.vmagent.util.Constants;
29+
import com.microsoft.azure.vmagent.util.CleanUpAction;
30+
import com.microsoft.azure.vmagent.remote.AzureVMAgentSSHLauncher;
31+
import com.microsoft.azure.vmagent.util.AzureCredentials;
3232

3333
import hudson.Extension;
3434
import hudson.model.TaskListener;

Diff for: src/main/java/com/microsoft/azure/AzureVMAgentCleanUpTask.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMAgentCleanUpTask.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

18+
import com.microsoft.azure.vmagent.Messages;
1819
import java.io.IOException;
1920
import java.util.concurrent.Callable;
2021
import java.util.logging.Logger;
2122

22-
import com.microsoft.azure.exceptions.AzureCloudException;
23+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
2324
import com.microsoft.azure.management.Azure;
2425
import com.microsoft.azure.management.resources.Deployment;
25-
import com.microsoft.azure.retry.DefaultRetryStrategy;
26-
import com.microsoft.azure.util.ExecutionEngine;
27-
import com.microsoft.azure.util.CleanUpAction;
28-
import com.microsoft.azure.util.TokenCache;
26+
import com.microsoft.azure.vmagent.retry.DefaultRetryStrategy;
27+
import com.microsoft.azure.vmagent.util.ExecutionEngine;
28+
import com.microsoft.azure.vmagent.util.CleanUpAction;
29+
import com.microsoft.azure.vmagent.util.TokenCache;
2930

3031
import jenkins.model.Jenkins;
3132
import hudson.Extension;

Diff for: src/main/java/com/microsoft/azure/AzureVMAgentPostBuildAction.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMAgentPostBuildAction.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

18-
import com.microsoft.azure.util.CleanUpAction;
18+
import com.microsoft.azure.vmagent.Messages;
19+
import com.microsoft.azure.vmagent.util.CleanUpAction;
1920
import java.io.IOException;
2021
import java.util.logging.Logger;
2122

Diff for: src/main/java/com/microsoft/azure/AzureVMAgentTemplate.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMAgentTemplate.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
import com.cloudbees.plugins.credentials.CredentialsProvider;
1919
import com.cloudbees.plugins.credentials.common.StandardListBoxModel;
2020
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials;
2121
import com.cloudbees.plugins.credentials.domains.DomainRequirement;
22-
import com.microsoft.azure.util.AzureCredentials;
23-
import com.microsoft.azure.util.AzureCredentials.ServicePrincipal;
24-
import com.microsoft.azure.exceptions.AzureCloudException;
22+
import com.microsoft.azure.vmagent.Messages;
23+
import com.microsoft.azure.vmagent.util.AzureCredentials;
24+
import com.microsoft.azure.vmagent.util.AzureCredentials.ServicePrincipal;
25+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
2526
import java.io.IOException;
2627
import java.util.ArrayList;
2728
import java.util.List;
@@ -35,9 +36,9 @@
3536
import org.kohsuke.stapler.DataBoundConstructor;
3637
import org.kohsuke.stapler.QueryParameter;
3738

38-
import com.microsoft.azure.util.AzureUtil;
39-
import com.microsoft.azure.util.Constants;
40-
import com.microsoft.azure.util.FailureStage;
39+
import com.microsoft.azure.vmagent.util.AzureUtil;
40+
import com.microsoft.azure.vmagent.util.Constants;
41+
import com.microsoft.azure.vmagent.util.FailureStage;
4142

4243
import hudson.Extension;
4344
import hudson.RelativePath;

Diff for: src/main/java/com/microsoft/azure/AzureVMCloud.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMCloud.java

+26-9
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,24 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
import com.cloudbees.plugins.credentials.CredentialsProvider;
1919
import com.cloudbees.plugins.credentials.common.StandardListBoxModel;
2020
import com.cloudbees.plugins.credentials.domains.DomainRequirement;
21-
import com.microsoft.azure.exceptions.AzureCloudException;
22-
import com.microsoft.azure.exceptions.AzureCredentialsValidationException;
21+
import com.microsoft.azure.vmagent.Messages;
22+
import com.microsoft.azure.PagedList;
23+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
24+
import com.microsoft.azure.vmagent.exceptions.AzureCredentialsValidationException;
2325
import com.microsoft.azure.management.Azure;
2426
import com.microsoft.azure.management.compute.OperatingSystemTypes;
2527
import com.microsoft.azure.management.compute.VirtualMachine;
2628
import com.microsoft.azure.management.resources.Deployment;
2729
import com.microsoft.azure.management.resources.DeploymentOperation;
28-
import com.microsoft.azure.util.AzureCredentials;
29-
import com.microsoft.azure.util.AzureUtil;
30-
import com.microsoft.azure.util.CleanUpAction;
30+
import com.microsoft.azure.vmagent.util.AzureCredentials;
31+
import com.microsoft.azure.vmagent.remote.AzureVMAgentSSHLauncher;
32+
import com.microsoft.azure.vmagent.util.AzureUtil;
33+
import com.microsoft.azure.vmagent.util.CleanUpAction;
3134
import java.util.ArrayList;
3235
import java.util.Collection;
3336
import java.util.Collections;
@@ -54,10 +57,13 @@
5457
import hudson.util.FormValidation;
5558
import hudson.util.StreamTaskListener;
5659

57-
import com.microsoft.azure.util.Constants;
58-
import com.microsoft.azure.util.FailureStage;
59-
import com.microsoft.azure.util.TokenCache;
60+
import com.microsoft.azure.vmagent.util.Constants;
61+
import com.microsoft.azure.vmagent.util.FailureStage;
62+
import com.microsoft.azure.vmagent.util.TokenCache;
63+
import hudson.init.InitMilestone;
64+
import hudson.init.Initializer;
6065
import hudson.model.Item;
66+
import hudson.model.Items;
6167
import hudson.security.ACL;
6268
import hudson.util.ListBoxModel;
6369
import java.nio.charset.Charset;
@@ -671,6 +677,17 @@ private static boolean isNodeEligibleForReuse(AzureVMAgent agentNode, AzureVMAge
671677
@Extension
672678
public static class DescriptorImpl extends Descriptor<Cloud> {
673679

680+
@Initializer(before = InitMilestone.PLUGINS_STARTED)
681+
public static void addAliases() {
682+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.AzureVMCloud", AzureVMCloud.class);
683+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.AzureVMAgent", AzureVMAgent.class);
684+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.remote.AzureVMAgentSSHLauncher", AzureVMAgentSSHLauncher.class);
685+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.AzureVMAgentTemplate", AzureVMAgentTemplate.class);
686+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.AzureVMCloudRetensionStrategy", AzureVMCloudRetensionStrategy.class);
687+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.AzureVMAgentPostBuildAction", AzureVMAgentPostBuildAction.class);
688+
Jenkins.XSTREAM2.addCompatibilityAlias("com.microsoft.azure.Messages", Messages.class);
689+
}
690+
674691
@Override
675692
public String getDisplayName() {
676693
return Constants.AZURE_CLOUD_DISPLAY_NAME;

Diff for: src/main/java/com/microsoft/azure/AzureVMCloudRetensionStrategy.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMCloudRetensionStrategy.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

18+
import com.microsoft.azure.vmagent.Messages;
1819
import java.util.logging.Logger;
1920

2021
import org.kohsuke.stapler.DataBoundConstructor;
2122

22-
import com.microsoft.azure.exceptions.AzureCloudException;
23-
import com.microsoft.azure.retry.LinearRetryForAllExceptions;
24-
import com.microsoft.azure.util.CleanUpAction;
25-
import com.microsoft.azure.util.Constants;
26-
import com.microsoft.azure.util.ExecutionEngine;
23+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
24+
import com.microsoft.azure.vmagent.retry.LinearRetryForAllExceptions;
25+
import com.microsoft.azure.vmagent.util.CleanUpAction;
26+
import com.microsoft.azure.vmagent.util.Constants;
27+
import com.microsoft.azure.vmagent.util.ExecutionEngine;
2728

2829
import hudson.model.Descriptor;
2930
import hudson.slaves.RetentionStrategy;

Diff for: src/main/java/com/microsoft/azure/AzureVMCloudVerificationTask.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMCloudVerificationTask.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

18-
import com.microsoft.azure.util.AzureCredentials;
19-
import com.microsoft.azure.util.AzureUtil;
18+
import com.microsoft.azure.vmagent.util.AzureCredentials;
19+
import com.microsoft.azure.vmagent.util.AzureUtil;
2020
import java.io.IOException;
2121
import java.util.HashMap;
2222
import java.util.Map;
@@ -25,7 +25,7 @@
2525
import hudson.Extension;
2626
import hudson.model.AsyncPeriodicWork;
2727
import hudson.model.TaskListener;
28-
import com.microsoft.azure.util.Constants;
28+
import com.microsoft.azure.vmagent.util.Constants;
2929
import java.util.ArrayList;
3030
import java.util.HashSet;
3131
import java.util.List;

Diff for: src/main/java/com/microsoft/azure/AzureVMComputer.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMComputer.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

18-
import com.microsoft.azure.exceptions.AzureCloudException;
19-
import com.microsoft.azure.retry.NoRetryStrategy;
20-
import com.microsoft.azure.util.ExecutionEngine;
18+
import com.microsoft.azure.vmagent.Messages;
19+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
20+
import com.microsoft.azure.vmagent.retry.NoRetryStrategy;
21+
import com.microsoft.azure.vmagent.util.ExecutionEngine;
2122
import java.io.IOException;
2223
import java.util.logging.Logger;
2324

Diff for: src/main/java/com/microsoft/azure/AzureVMDeploymentInfo.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMDeploymentInfo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
/**
1919
* Simple class with info from a new Azure deployment

Diff for: src/main/java/com/microsoft/azure/AzureVMManagementServiceDelegate.java renamed to src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java

+13-13
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
import com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials;
1919
import com.fasterxml.jackson.databind.JsonNode;
@@ -40,8 +40,8 @@
4040
import java.util.concurrent.TimeoutException;
4141
import java.util.logging.Logger;
4242

43-
import com.microsoft.azure.exceptions.AzureCloudException;
44-
import com.microsoft.azure.exceptions.UnrecoverableCloudException;
43+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
44+
import com.microsoft.azure.vmagent.exceptions.UnrecoverableCloudException;
4545
import com.microsoft.azure.management.Azure;
4646
import com.microsoft.azure.management.compute.OperatingSystemTypes;
4747
import com.microsoft.azure.management.compute.PowerState;
@@ -53,21 +53,21 @@
5353
import com.microsoft.azure.management.network.Network;
5454
import com.microsoft.azure.management.resources.DeploymentMode;
5555
import com.microsoft.azure.management.storage.StorageAccountKey;
56-
import com.microsoft.azure.retry.ExponentialRetryStrategy;
57-
import com.microsoft.azure.retry.NoRetryStrategy;
56+
import com.microsoft.azure.vmagent.retry.ExponentialRetryStrategy;
57+
import com.microsoft.azure.vmagent.retry.NoRetryStrategy;
5858
import com.microsoft.azure.storage.AccessCondition;
5959
import com.microsoft.azure.storage.CloudStorageAccount;
6060
import com.microsoft.azure.storage.StorageCredentialsAccountAndKey;
6161
import com.microsoft.azure.storage.blob.CloudBlobClient;
6262
import com.microsoft.azure.storage.blob.CloudBlockBlob;
63-
import com.microsoft.azure.util.AzureCredentials;
64-
import com.microsoft.azure.util.AzureCredentials.ServicePrincipal;
65-
import com.microsoft.azure.util.AzureUtil;
66-
import com.microsoft.azure.util.CleanUpAction;
67-
import com.microsoft.azure.util.Constants;
68-
import com.microsoft.azure.util.ExecutionEngine;
69-
import com.microsoft.azure.util.FailureStage;
70-
import com.microsoft.azure.util.TokenCache;
63+
import com.microsoft.azure.vmagent.util.AzureCredentials;
64+
import com.microsoft.azure.vmagent.util.AzureCredentials.ServicePrincipal;
65+
import com.microsoft.azure.vmagent.util.AzureUtil;
66+
import com.microsoft.azure.vmagent.util.CleanUpAction;
67+
import com.microsoft.azure.vmagent.util.Constants;
68+
import com.microsoft.azure.vmagent.util.ExecutionEngine;
69+
import com.microsoft.azure.vmagent.util.FailureStage;
70+
import com.microsoft.azure.vmagent.util.TokenCache;
7171
import java.io.InputStream;
7272
import java.net.URI;
7373
import java.util.Arrays;

Diff for: src/main/java/com/microsoft/azure/ImageProperties.java renamed to src/main/java/com/microsoft/azure/vmagent/ImageProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
public enum ImageProperties {
1919

Diff for: src/main/java/com/microsoft/azure/ImageType.java renamed to src/main/java/com/microsoft/azure/vmagent/ImageType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
public enum ImageType {
1919

Diff for: src/main/java/com/microsoft/azure/StorageServiceDelegate.java renamed to src/main/java/com/microsoft/azure/vmagent/StorageServiceDelegate.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure;
16+
package com.microsoft.azure.vmagent;
1717

1818
import com.microsoft.azure.storage.CloudStorageAccount;
1919
import com.microsoft.azure.storage.StorageCredentialsAccountAndKey;
@@ -34,8 +34,8 @@
3434
import java.util.logging.Logger;
3535

3636

37-
import com.microsoft.azure.exceptions.AzureCloudException;
38-
import com.microsoft.azure.util.Constants;
37+
import com.microsoft.azure.vmagent.exceptions.AzureCloudException;
38+
import com.microsoft.azure.vmagent.util.Constants;
3939

4040
/**
4141
* Business delegate class which handles storage service calls

Diff for: src/main/java/com/microsoft/azure/exceptions/AzureCloudException.java renamed to src/main/java/com/microsoft/azure/vmagent/exceptions/AzureCloudException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure.exceptions;
16+
package com.microsoft.azure.vmagent.exceptions;
1717

1818
public class AzureCloudException extends Exception {
1919

Diff for: src/main/java/com/microsoft/azure/exceptions/AzureCredentialsValidationException.java renamed to src/main/java/com/microsoft/azure/vmagent/exceptions/AzureCredentialsValidationException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
18-
package com.microsoft.azure.exceptions;
18+
package com.microsoft.azure.vmagent.exceptions;
1919

2020
public class AzureCredentialsValidationException extends Exception {
2121

Diff for: src/main/java/com/microsoft/azure/exceptions/UnrecoverableCloudException.java renamed to src/main/java/com/microsoft/azure/vmagent/exceptions/UnrecoverableCloudException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
package com.microsoft.azure.exceptions;
16+
package com.microsoft.azure.vmagent.exceptions;
1717

1818
public class UnrecoverableCloudException extends AzureCloudException {
1919

0 commit comments

Comments
 (0)