6 Replies Latest reply on Sep 17, 2020 1:04 PM by lhoffer

    Velocloud Orchestrator REST API updateConfigurationModule

    wilgus Lurker

      I am able to create a new Profile in the Velocloud Orchestrator using the configuration/cloneEnterpriseTemplate

       

      I can also get the specifics of the new Profile using configuration/getConfigurationModules

       

                "vpn": {

                  "enabled": false,

                  "edgeToEdge": false,

                  "edgeToDataCenter": false,

                  "ref": "deviceSettings:vpn:dataCenter",

                  "edgeToEdgeHub": {

                    "enabled": false,

                    "ref": "deviceSettings:vpn:edgeHub",

                    "vpnHubs": []

                  },

       

       

      I am trying to figure out how to update the vpn.enabled to true & vpn.edgeToEdge to true using configuration/updateConfigurationModule

       

      This is the example body I am trying to populate to do the update:

       

           {
            
      "id": 0,
            
      "enterpriseId": 0,
            
      "_update": {
             
      "name": "string",
             
      "description": "string",
             
      "version": "string",
             
      "effective": "string"
            
      }
           }

       

      Any help, like a change in endpoint or example of how to populate the body to update these attributes would be greatly appreciated.

        • 1. Re: Velocloud Orchestrator REST API updateConfigurationModule
          lhoffer Expert
          VMware EmployeesvExpert

               {
                
          "id": 0, <-- This is the configuration module ID that you can find using the configuration/getConfiguration method to pull the profile, in this case you're looking for the "deviceSettings" module
                
          "enterpriseId": 0, <--Not required unless you're using a partner or operator account
                
          "_update": <--This section will contain the the "data" object in the module that you can copy from the existing profile and just modify the VPN settings in the segment you're working with
                 
          "name": "string",
                 
          "description": "string",
                 
          "version": "string",
                 
          "effective": "string"
                
          }
               }

          • 2. Re: Velocloud Orchestrator REST API updateConfigurationModule
            wilgus Lurker

            lhoffer,

             

            This lead me down the right path, that data object is huge - kinda assumed that there might be a short cut to update the specific sections of the data object.

             

            Thanks.

             

            Scott Wilgus Reynolds

            • 3. Re: Velocloud Orchestrator REST API updateConfigurationModule
              wilgus Lurker

              Issue: using configuration/getConfiguration by name instead of id when id is not known

               

              Thanks to your help I have created a Profile in Velocloud Orchestrator, given it a name = "CruzOCProfile", and updated the profile using REST calls. 

              I was wondering if you know how to retrieve the Profile based on the name = "CruzOCProfile" instead of the id itself.

              I am trying to come figure out if the Profile is already existing in a Velocloud Orchestrator instance and instead of recreating it just use the existing profile.

              Thanks.

              Scott Wilgus Reynolds

              sreynolds@doradosoftware.com

              • 4. Re: Velocloud Orchestrator REST API updateConfigurationModule
                lhoffer Expert
                VMware EmployeesvExpert

                Unfortunately the profile ID is a required parameter for that method so you'd need to use the /enterprise/getEnterpriseConfigurations method to pull them all first, find the CruzOCProfile in that list, and determine the ID based on that.

                1 person found this helpful
                • 5. Re: Velocloud Orchestrator REST API updateConfigurationModule
                  wilgus Lurker

                  Thanks to your assistance I am now able to determine if the Profile exists, use it and assign it to a specific edge.

                   

                  I am now trying to use REST to update the "Edge Specific Profile", specifically the VLAN section.

                   

                  Using edge/getEdgeConfigurationStack to obtain the "Edge Specific Profile", the id is easily determined.

                   

                  However, when I use configuration/getConfiguration, using the id for the "Edge Specific Profile" the details of the networks are no longer available.

                   

                  I have tried to update the "Edge Specific Profile", but the call returns an error:

                   

                  {  "error": {    "code": -32603,

                      "message": "invalid or immutable attribute to configuration/updateConfiguration"  } }

                   

                  Are there REST calls that can be used to retrieve & update the "Edge Specific Profile"?

                   

                  Thanks.

                   

                  Scott Wilgus Reynolds

                  sreynolds@doradosoftware.com

                  • 6. Re: Velocloud Orchestrator REST API updateConfigurationModule
                    lhoffer Expert
                    vExpertVMware Employees

                    The "edge specific profile" you get with the edge/getEdgeConfigurationStack method is where edge level override configuration modules go so aren't "profiles" in the sense of what you get from configuration/getConfiguration.

                     

                    Since an edge specific profile is specific to an individual edge, you can only retrieve them with the edge/getEdgeConfigurationStack.  If you're looking to modify it, you'd either use the configuration/updateConfigurationModule method to modify existing individual modules inside of the edge specific profile (in which case you'd just be referencing the configuration module id), or, if you are trying to create an edge level override for a module that doesn't have any edge overrides yet (in which case the module won't be present in the edge specific profile) you'd use the configuration/insertConfigurationModule method to create it and that call would reference the id of the edge specific profile.