-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add remove_resource
function
#245
Conversation
scope.catalog.remove_resource(catalog_resource) | ||
scope.compiler.resources.delete(catalog_resource) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you maybe write a sentence or two what's the difference of catalog vs compiler here? Do horrible things happen when other resources depend on the one that's deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scope.catalog
is the same as scope.compiler.catalog
.
I'll try to come up with some better explanation for these two lines though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Horrible things? Not really. At the end of the catalog compilation process, if any resources mentioned in relationships have been removed, you get the standard Could not find resource
error.
notify { ['foo','bar']: }
Notify['foo'] -> Notify['bar']
extlib::remove_resource(Notify['foo'])
Error: Could not find resource 'Notify[foo]' for relationship on 'Notify[bar]' on node example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a comment and also split out the unrelated puppet-strings fixup into its own commit.
b6e29af
to
7afb84e
Compare
By using the `@summary` tag correctly, only that line is included in the REFERENCE function index.
7afb84e
to
ee8a531
Compare
No description provided.