Let instructions exist under /subresource level 27/111927/4
authorIgor D.C <igor.duarte.cardoso@intel.com>
Mon, 31 Aug 2020 23:00:46 +0000 (23:00 +0000)
committerIgor D.C <igor.duarte.cardoso@intel.com>
Thu, 24 Sep 2020 21:41:35 +0000 (21:41 +0000)
Instructions (order/dependency) can now belong to an
app, a resource or a subresource.

Issue-ID: MULTICLOUD-1143
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
Change-Id: Iee55c2bbb569de242e66f5a5456ac52025a00f0e

src/orchestrator/pkg/appcontext/appcontext.go

index 5d75794..d77672d 100644 (file)
@@ -419,7 +419,7 @@ func (ac *AppContext) AddInstruction(handle interface{}, level string, insttype
        if !(insttype == "order" || insttype == "dependency") {
                return nil, pkgerrors.Errorf("Not a valid app context instruction type")
        }
-       if !(level == "app" || level == "resource") {
+       if !(level == "app" || level == "resource" || level == "subresource") {
                return nil, pkgerrors.Errorf("Not a valid app context instruction level")
        }
        h, err := ac.rtc.RtcAddInstruction(handle, level, insttype, value)