File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,23 @@ Netbox Script Manager has basic support for pulling down changes for git reposit
139
139
140
140
If more advanced syncing is required, its recommended to handle this outside of netbox or alternatively use a custom script to do the sync.
141
141
142
+ ## Script Artifacts
143
+
144
+ The plugin allows you to, in a script, save arbritrary blobs of data as downloadable artifacts.
145
+
146
+ Example:
147
+
148
+ ``` python
149
+ class RootScript1 (CustomScript ):
150
+ class Meta :
151
+ name = " Test Script"
152
+ description = " Testing"
153
+
154
+ def run (self , data , commit ):
155
+ # The data can be passed as bytes or a string. If passed as a string, the data will be encoded to bytes with the passed encoding automatically.
156
+ self .save_artifact(" myfile.cfg" , b " testfile" , content_type = " text/plain" , encoding = " utf-8" )
157
+ ```
158
+
142
159
## Screenshots
143
160
144
161
TODO
You can’t perform that action at this time.
0 commit comments