def trunk_can_be_managed(context, trunk):
 if (not trunk.admin_state_up):
  raise trunk_exc.TrunkDisabled(trunk_id=trunk.id)

def trunk_can_be_managed ( context , trunk ) : if ( not trunk . admin_state_up ) : raise trunk_exc . TrunkDisabled ( trunk_id = trunk . id )
validate that the trunk can be managed .