Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1584

Deployment API fails when ARM Template deploys for creating Azure VM

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Hello,

      we are using jclouds for azure compute operations. while using deployment API for creating virtual machine using ARM Template get success but fails to get the deployment details.

       

      while investigating we found two issues

      1. java.lang.NullPointerException: Null valuejava.lang.NullPointerException: Null value at org.jclouds.azurecompute.arm.domain.AutoValue_Value.<init>(AutoValue_Value.java:20) at org.jclouds.azurecompute.arm.domain.Value.create(Value.java:39)

      The ARM template have secure information (password) which Azure is not returning the value when we do GET on the deployment, which is causing null pointer @Value.java 

      Solution: We added @Nullable to value() which solved our issue.

       

      2. com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 472 path $.properties.parameters..value
      at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:193)

       

      The ARM Template have parameters which is type Array is the reason.

       

      Solution: We have modified parameter map value to JSONBALL to accept all types of values.

       

      we would like to have patch including the solutions, please review and accept the request.

      Thanks.

       

      Attachments

        1. Deployment.java
          10 kB
          Rajani Palavala
        2. Value.java
          1 kB
          Rajani Palavala

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gaul Andrew Gaul
            rajanip Rajani Palavala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment