#NEWLINE# @ validation . required_services ( consts . Service . NEUTRON ) #NEWLINE# @ validation . required_openstack ( users = True ) #NEWLINE# @ scenario . configure ( context = { #NEWLINE# #INDENT# 'cleanup' : [ 'neutron' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# def create_and_update_security_groups( self , security_group_create_args = None , security_group_update_args = None ) : #NEWLINE# #INDENT# 'Create and update Neutron security-groups.\n\n        Measure the "neutron security-group-create" and "neutron\n        security-group-update" command performance.\n\n        :param security_group_create_args: dict, POST /v2.0/security-groups\n                                           request options\n        :param security_group_update_args: dict, POST /v2.0/security-groups\n                                           update options\n        ' #NEWLINE# security_group_create_args = ( security_group or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# security_group_update_args = ( security_group_update_args or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# security_group = self . _create_security_group ( ** security_group_create_args ) #NEWLINE# self . _update_security_group ( security_group , ** security_group_update_args )