@@ -237,38 +237,22 @@ def __init__(self, group_name=None, **kwargs):
237237 ArgumentError ("You must provide the name of the group" )
238238 Action .__init__ (self , usergroup = group_name , ** kwargs )
239239
240- def add_to_products (self , products = None , all_products = False ):
240+ def add_to_products (self , products ):
241241 """
242242 Add user group to some product license configuration groups (PLCs), or all of them.
243243 :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)
245244 :return: the Group, so you can do Group(...).add_to_products(...).add_users(...)
246245 """
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 )}
255247 return self .append (add = plist )
256248
257- def remove_from_products (self , products = None , all_products = False ):
249+ def remove_from_products (self , products ):
258250 """
259251 Remove user group from some product license configuration groups (PLCs), or all of them.
260252 :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)
262253 :return: the Group, so you can do Group(...).remove_from_products(...).add_users(...)
263254 """
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 )}
272256 return self .append (remove = plist )
273257
274258 def add_users (self , users = None ):
0 commit comments