def update_portal(self, portal_obj):
headers = {<EOL>'<STR_LIT>': self.user_agent(),<EOL>}<EOL>headers.update(self.headers())<EOL>r = requests.put(   self.portals_url()+'<STR_LIT>'+self.portal_id(), <EOL>data=json.dumps(portal_obj),<EOL>headers=headers,<EOL>auth=self.auth())<EOL>if HTTP_STATUS.OK == r.status_code:<EOL><INDENT>return r.json()<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>".format(<EOL>r.status_code, r.reason))<EOL>r.raise_for_status()<EOL><DEDENT>
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