def add_device(self, model, serial):
device = {<EOL>'<STR_LIT>': model,<EOL>'<STR_LIT>': self.vendor(),<EOL>'<STR_LIT>': serial,<EOL>'<STR_LIT:type>': '<STR_LIT>'<EOL>}<EOL>headers = {<EOL>'<STR_LIT>': self.user_agent(),<EOL>}<EOL>headers.update(self.headers())<EOL>r = requests.post(  self.portals_url()+'<STR_LIT>'+self.portal_id()+'<STR_LIT>', <EOL>data=json.dumps(device),<EOL>headers=headers,<EOL>auth=self.auth())<EOL>if HTTP_STATUS.ADDED == r.status_code:<EOL><INDENT>device_obj = r.json()<EOL>return dictify_device_meta(device_obj)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>".format(<EOL>r.status_code, r.reason))<EOL>r.raise_for_status()<EOL><DEDENT>
Returns 'device object' of newly created device.

http://docs.exosite.com/portals/#create-device
http://docs.exosite.com/portals/#device-object