'Resource attributes map to deployment outputs values.'

def get_attribute(self, key, *path):

    sd = self.rpc_client().show_software_deployment(self.context, self.resource_id)
    ov = (sd[rpc_api.SOFTWARE_DEPLOYMENT_OUTPUT_VALUES] or {})
    if (key in ov):
        attribute = ov.get(key)
        return attributes.select_from_attribute(attribute, path)
    sc = self.rpc_client().show_software_config(self.context, self.properties[self.CONFIG])
    outputs = (sc[rpc_api.SOFTWARE_CONFIG_OUTPUTS] or [])
    output_keys = [output['name'] for output in outputs]
    if ((key not in output_keys) and (key not in self.ATTRIBUTES)):
        raise exception.InvalidTemplateAttribute(resource=self.name, key=key)
    return None
