(op)
return False
Retun True if the blockExternalNetwork flag is set for the user action.
Retun True if the blockExternalNetwork flag is set for the user action.
Retun True if the blockExternalNetwork flag is set for the user action .
def external_network_blocked(op):
  """Retun True if the blockExternalNetwork flag is set for the user action."""
  user_action = get_action_by_name(op, 'user-command')
  if user_action:
    if _API_VERSION == google_v2_versions.V2ALPHA1:
      flags = user_action.get('flags')
      if flags:
        return 'BLOCK_EXTERNAL_NETWORK' in flags
    elif _API_VERSION == google_v2_versions.V2BETA:
      return user_action.get('blockExternalNetwork')
    else:
      assert False, 'Unexpected version: {}'.format(_API_VERSION)
  return False
def external_network_blocked ( op ) : user_action = get_action_by_name ( op , 'user-command' ) if user_action : if _API_VERSION == google_v2_versions . V2ALPHA1 : flags = user_action . get ( 'flags' ) if flags : return 'BLOCK_EXTERNAL_NETWORK' in flags elif _API_VERSION == google_v2_versions . V2BETA : return user_action . get ( 'blockExternalNetwork' ) else : assert False , 'Unexpected version: {}' . format ( _API_VERSION ) return False