def getExtensionArgs(self):
        args = {}

        if self.required:
            args['required'] = ','.join(self.required)

        if self.optional:
            args['optional'] = ','.join(self.optional)

        if self.policy_url:
            args['policy_url'] = self.policy_url

        return args
All-in-one function to deploy a whole disk image to a node.
dataset/ETHPy150Open CollabQ/CollabQ/openid/extensions/sreg.py/SRegRequest.getExtensionArgs--crossover with--dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/deploy_utils.py/deploy_disk_image