Re: [Anima] question about future-proofing of GRASP objectives

Brian E Carpenter <> Sun, 13 December 2020 02:53 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id BFAA13A1058 for <>; Sat, 12 Dec 2020 18:53:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.2
X-Spam-Status: No, score=-0.2 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 7ZrlKh-I4IJ1 for <>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4864:20::1031]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id C6C463A1057 for <>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
Received: by with SMTP id lb18so4353837pjb.5 for <>; Sat, 12 Dec 2020 18:53:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=CS/MgZhvRlkugS3zKtYLMoRSn+ULIAp0OS5wk6sdrVI=; b=jKYs5xObRG3j4crPt9c9d+B2f6zo7KSTVzoZTx5CsdWLq1WB7SKfVzAmnltrP2+lBA 15YFJ5kXT4DLOCepXI1xe8cnw4Y+QjIbLEAdv/b+AnkzpIR6cHuLqBD2fRMjuJr+iSgG FM8U1oS1C98tHe5vsPuZjT9lt0rC87M8N/yqzwVbvzhV7i2ib07MDJOXTUNUu6UdN6c+ 10YbRlkNqAnceH4MJpljskOlRI+WD+fLSPA33kHTOd+6tfMYABNR24adE3RKhjld+TYi iG2zYJ6B7IXS+/PS9PTm2OGLlf4kQMN+xsRCnz1mWZQ+/ghQICTRsvvSyaiuQzQxdNVQ 6iHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CS/MgZhvRlkugS3zKtYLMoRSn+ULIAp0OS5wk6sdrVI=; b=Dck7vEv1yjEt/nArN6WD5i2BhPeZ3G0BXSB1kpJMJ6iD+KUa9e8zPwqaSbm+X1qaFS bkXpY9dVbPUKlOaXVFiSRcLAWXgIuzzDpr0SNlE1aoW+Gg254TU82nCfWU4dQW5E3QdF 486OMbh5Eu5UhIW7O906yPA9ubnyobCAhVnIPsqDGUohTBiwx7XVoZMUC5prcSy95ePj BeG7P7eoTI/owZzUvQA479hOdWMOAAo2SCpFKRdMlb5S8duiEqp/iU8qVtBlPhZBZvbk vuaSaFxQ+HY3rszpqrfeX1uyt8N50stdzaFS6060ssZYT3rsKw9iJsv+W2bDJfiMVDIu IT2g==
X-Gm-Message-State: AOAM53230o25noH8XS2xxm3oZrIcZChAp8E3Vg3HUf7k5Bnnvm0JuEWV VfI7Nxjdg5F71MTEy0hku4cRJWVfd3XpZA==
X-Google-Smtp-Source: ABdhPJxxJNylIFMD6C9UICyNFY2zNqSIYUhyNtOmaMASdHEf3iMFMwRUmeaEdyxGJNJBOeysy6OImw==
X-Received: by 2002:a17:90b:16cd:: with SMTP id iy13mr19302186pjb.182.1607828025830; Sat, 12 Dec 2020 18:53:45 -0800 (PST)
Received: from [] ([]) by with ESMTPSA id r68sm15567030pfr.113.2020. (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Dec 2020 18:53:45 -0800 (PST)
To: Michael Richardson <>,
References: <31729.1607817912@localhost>
From: Brian E Carpenter <>
Message-ID: <>
Date: Sun, 13 Dec 2020 15:53:42 +1300
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <31729.1607817912@localhost>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [Anima] question about future-proofing of GRASP objectives
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Autonomic Networking Integrated Model and Approach <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 13 Dec 2020 02:53:48 -0000

On 13-Dec-20 13:05, Michael Richardson wrote:
> GRASP objectives look like:
>   objective = [objective-name, objective-flags, loop-count, ?objective-value]
>   objective-name = text ;see section "Format of Objective Options"
>   objective-flags = uint .bits objective-flag
>   loop-count = 0..255
> so, ['string', uint, uint, otherstuff]
> There can be an array of objectives.

Right, but only in an M_FLOOD message at present. Of course, we could
in theory add other message formats with multiple objectives.

> If any of the objectives do not match the above CDDL, what do I do?

A related question was raised on the API draft by Ben Kaduk: how do we
apply the (new) recommendations on CBOR validation in RFC8949?

> Options are:
>   1) throw away that objective and move on to the others, which maybe
>      look right?

I would say that by the nature of M_FLOOD,  that is the logically
correct approach.

>   2) throw away the entire message.
> (2) is certainly easier to code.

Each objective is a self-contained CBOR array, so could
be parsed quite independently of the others.
[pause to glance at my code]
However, I did do it the lazy way, i.e. the parsing loop exits
on the first error. (If you look at my code, that's in the
elif ... M_FLOOD case inside _parse_msg().) 

It would indeed be a little more work to skip the faulty objectives
and process the valid ones. I probably should add that to my
code since it would be useful for debugging.

> (1) seems way more future proof.

It depends on whether you prefer the Postel principle or