def connect(self):
        # Don't try to register if we already have
        if self.validate_registration():
            return True

        body = {
            'devicetype': self.device_type,
            'username': self.username,
        }
        response = self.make_request('POST', '/api', body)

        if 'error' in response:
            if response['error']['type'] == 101:
                msg = 'Please press the link button and try again'
            else:
                msg = response['error']['description']

            raise Exception(msg)
Add extra specs to a flavor
dataset/ETHPy150Open sontek/bulby/bulby/client.py/HueBridgeClient.connect--crossover with--dataset/ETHPy150Open openstack-infra/shade/shade/operatorcloud.py/OperatorCloud.set_flavor_specs