code: def update_portal(self, portal_obj):
          
          headers = {
                  'User-Agent': self.user_agent(),
          }
          headers.update(self.headers())
  
          r = requests.put(   self.portals_url()+'/portals/'+self.portal_id(), 
                              data=json.dumps(portal_obj),
                              headers=headers,
                              auth=self.auth())
          if HTTP_STATUS.OK == r.status_code:
              return r.json()
          else:
              print("update_portal: Something went wrong: <{0}>: {1}".format(
                          r.status_code, r.reason))
              r.raise_for_status()
docs: Implements the Update device Portals API.
  
              This function is extremely dangerous. The portal object
              you pass in will completely overwrite the portal.
              
              http://docs.exosite.com/portals/#update-portal