def METHOD_NAME(self):
    cert = crypto.load_certificate(crypto.FILETYPE_PEM, open(self.cert_path).read())
    cert_thumbprint = cert.digest("sha1").replace(":", "")
    date = datetime.datetime.utcnow().isoformat() + "0-00:00"
    payload = {'RunbookWorkerGroup': self.worker_group_name,
               "MachineName": socket.gethostname(),
               "IpAddress": socket.gethostbyname(socket.gethostname()),
               "Thumbprint": cert_thumbprint,
               "Issuer": str(cert.get_issuer()),
               "Subject": str(cert.get_subject())}
    signature = self.compute_hmac(date, self.account_key, payload)
    header = {'Authorization': 'Shared ' + signature,
              'ProtocolVersion': self.protocol_version,
              'x-ms-date': date,
              "Content-Type": "application/json"}
    url = "{0}/HybridV2(MachineId='{1}')".format(self.endpoint, self.machine_id)
    req = requests.put(url, cert=(self.cert_path, self.cert_key_path), verify=True, headers=header,
                       data=json.dumps(payload))
    if req.status_code is not 200:
        print "Agentservice : Failed to register worker. Status [{0}], Reason [{1}]".format(req.status_code,
                                                                                            req.reason)
        return
    print "Agentservice : Registration complete, status [" + str(req.status_code) + "]"
    print "Machine name : " + str(socket.gethostname())
    print "Machine id : " + str(self.machine_id)
    print "Worker group name : " + str(self.worker_group_name)
    print "Certificate thumbprint : " + str(cert_thumbprint)