@@ -51,14 +51,15 @@ def get_manifest(manifest_category, allocation_name, requester):
51
51
default = False ,
52
52
help = "Delete local manifest files in addition to upstream subscription allocations" ,
53
53
)
54
- def delete (allocations , all_ , remove_manifest_file ):
54
+ @click .option ("--offline-token" , type = str , default = None )
55
+ def delete (allocations , all_ , remove_manifest_file , offline_token ):
55
56
"""Delete subscription allocations in inventory and optionally delete local manifest files."""
56
57
inv = helpers .load_inventory_file (Path (settings .inventory_path ))
57
58
for num , allocation in enumerate (inv ):
58
59
if str (num ) in allocations or allocation .get ("name" ) in allocations or all_ :
59
- Manifester (minimal_init = True ). delete_subscription_allocation (
60
- uuid = allocation . get ( "uuid" )
61
- )
60
+ Manifester (
61
+ minimal_init = True , offline_token = offline_token
62
+ ). delete_subscription_allocation ( uuid = allocation . get ( "uuid" ))
62
63
if remove_manifest_file :
63
64
manifester_directory = (
64
65
Path (os .environ ["MANIFESTER_DIRECTORY" ]).resolve ()
@@ -78,7 +79,9 @@ def inventory(details, sync, offline_token):
78
79
"""Display the local inventory file's contents."""
79
80
border = "-" * 38
80
81
if sync :
81
- helpers .update_inventory (Manifester (minimal_init = True , offline_token = offline_token ).subscription_allocations )
82
+ helpers .update_inventory (
83
+ Manifester (minimal_init = True , offline_token = offline_token ).subscription_allocations
84
+ )
82
85
inv = helpers .load_inventory_file (Path (settings .inventory_path ))
83
86
if not details :
84
87
logger .info ("Displaying local inventory data" )
0 commit comments