@@ -237,38 +237,22 @@ def __init__(self, group_name=None, **kwargs):
237
237
ArgumentError ("You must provide the name of the group" )
238
238
Action .__init__ (self , usergroup = group_name , ** kwargs )
239
239
240
- def add_to_products (self , products = None , all_products = False ):
240
+ def add_to_products (self , products ):
241
241
"""
242
242
Add user group to some product license configuration groups (PLCs), or all of them.
243
243
:param products: list of product names the user should be added to
244
- :param all_products: a boolean meaning add to all (don't specify products in this case)
245
244
:return: the Group, so you can do Group(...).add_to_products(...).add_users(...)
246
245
"""
247
- if all_products :
248
- if products :
249
- raise ArgumentError ("When adding to all products, do not specify specific products" )
250
- plist = "all"
251
- else :
252
- if not products :
253
- raise ArgumentError ("You must specify products to which to add the user group" )
254
- plist = {"productConfiguration" : [product for product in products ]}
246
+ plist = {"productConfiguration" : list (products )}
255
247
return self .append (add = plist )
256
248
257
- def remove_from_products (self , products = None , all_products = False ):
249
+ def remove_from_products (self , products ):
258
250
"""
259
251
Remove user group from some product license configuration groups (PLCs), or all of them.
260
252
:param products: list of product names the user group should be removed from
261
- :param all_products: a boolean meaning remove from all (don't specify products in this case)
262
253
:return: the Group, so you can do Group(...).remove_from_products(...).add_users(...)
263
254
"""
264
- if all_products :
265
- if products :
266
- raise ArgumentError ("When removing from all products, do not specify specific products" )
267
- plist = "all"
268
- else :
269
- if not products :
270
- raise ArgumentError ("You must specify products from which to remove the user group" )
271
- plist = {"productConfiguration" : [product for product in products ]}
255
+ plist = {"productConfiguration" : list (products )}
272
256
return self .append (remove = plist )
273
257
274
258
def add_users (self , users = None ):
0 commit comments