0 Replies Latest reply on Sep 17, 2014 7:56 AM by jmedd

    Setting App Firewall Rules via the API fails immediately after PortGroup Namespace change

    jmedd Enthusiast

      vCNS 5.5


      On a freshly created DVPortGroup I can successfully change the Namespace via the API to Independent to (among other things) enable the App Firewall. If I then immediately send another API call to update the default App Firewall Rule from Any Any Allow to Any Any Deny it fails with:


      HTTP 412 "A specified pre-condition has failed for this request"


      If instead I leave a gap in time between the two requests the second request is then successful. So for example:


      Change PortGroup Namespace to Independent

      Pause 1 min (I haven't tested any lower than this yet)

      Amend Default Firewall Rule


      I don't really want to leave the Pause in there so have tried:


      Change PortGroup Namespace to Independent

      Test PortGroup Namespace is Independent

      if (Independent){

           Amend Default Firewall Rule



      which still fails.


      Any idea why I have to leave a time gap after the Portgroup Namespace change to Independent?