From 8a24e5cbafe8ca30e05ac10fac1193c703540a2b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 25 Sep 2025 17:09:08 +0100 Subject: [PATCH 1/2] docs: Distinguish between import, create dependencies Signed-off-by: Stephen Finucane --- website/docs/development/controller-design.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/website/docs/development/controller-design.md b/website/docs/development/controller-design.md index 3211096d7..76a97dc6b 100644 --- a/website/docs/development/controller-design.md +++ b/website/docs/development/controller-design.md @@ -83,11 +83,7 @@ Dependencies are at the core of what ORC does. At the lowest level ORC performs * As soon as possible * In parallel if possible -It achieves this through dependency management. - -!!! note - - ORC dependencies can *only* be expressed between ORC objects. Therefore if one OpenStack resource depends on another, that relationship can only be expressed in ORC if both resources have corresponding ORC objects. Resoruces which a user may depend on but cannot create, like a flavor or a provider network, can be expressed by importing an existing resource. +ORC achieves this through dependency management. OpenStack doesn't have the concept of resource dependencies natively, so ORC expresses dependencies through ORC objects, not their underlying OpenStack resources. Resources that a user can create and may be depended on, like a server group or image, are expressed as *create dependencies*, while resources that the user cannot create but may be depended on, like a flavor or provider network, are expressed *import dependencies*. A dependency is used anywhere that the controller must reference another object to complete an action. The dependency has features that enable us to: From 611aa6e6f536478247449a7e2c3a482350bf66a9 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 25 Sep 2025 17:09:30 +0100 Subject: [PATCH 2/2] scaffold-controller: Make difference between questions more obvious Signed-off-by: Stephen Finucane --- cmd/scaffold-controller/main.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cmd/scaffold-controller/main.go b/cmd/scaffold-controller/main.go index 37ac50c75..442f202a8 100644 --- a/cmd/scaffold-controller/main.go +++ b/cmd/scaffold-controller/main.go @@ -140,9 +140,10 @@ func main() { } if len(fields.RequiredCreateDependencies) == 0 { - answer := getUserInput("Does this resource have required dependencies upon creation? "+ - "List all the resources it must depend on. "+ - "Provide this as a comma-separated list, for example: Subnet, Port, Project", interactive) + answer := getUserInput("Does this resource have **required** dependencies upon creation? "+ + "List all the resources it **must** depend on, if any. "+ + "Provide this as a comma-separated list or omit if there are no dependencies. "+ + "For example: Subnet, Port, Project", interactive) dependencies := strings.Split(answer, ",") for _, dep := range dependencies { trimmedDep := strings.TrimSpace(dep) @@ -153,9 +154,10 @@ func main() { } if len(fields.OptionalCreateDependencies) == 0 { - answer := getUserInput("Does this resource have optional dependencies upon creation? "+ - "List all the resources it optionally depend on. "+ - "Provide this as a comma-separated list, for example: Subnet, Port, Project", interactive) + answer := getUserInput("Does this resource have **optional** dependencies upon creation? "+ + "List all the resources it **optionally** depends on, if any. "+ + "Provide this as a comma-separated list or omit if there are no dependencies. "+ + "For example: Subnet, Port, Project", interactive) dependencies := strings.Split(answer, ",") for _, dep := range dependencies { trimmedDep := strings.TrimSpace(dep) @@ -168,7 +170,8 @@ func main() { if len(fields.ImportDependencies) == 0 { answer := getUserInput("Does this resource have dependencies upon import? "+ "List all the resources it can depend on. "+ - "Provide this as a comma-separated list, for example: Subnet, Port, Project", interactive) + "Provide this as a comma-separated list or omit if there are no dependencies. "+ + "For example: Subnet, Port, Project", interactive) dependencies := strings.Split(answer, ",") for _, dep := range dependencies { trimmedDep := strings.TrimSpace(dep)