vici: Update command wrappers of the Ruby bindings
Also reorder them to match README.md.
This commit is contained in:
@@ -404,98 +404,21 @@ module Vici
|
|||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# List matching loaded connections. The provided closure is invoked
|
# Get daemon version information
|
||||||
# for each matching connection.
|
def version
|
||||||
def list_conns(match = nil, &block)
|
call("version")
|
||||||
call_with_event("list-conns", Message.new(match), "list-conn", &block)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# List matching active SAs. The provided closure is invoked for each
|
# Get daemon statistics and information.
|
||||||
# matching SA.
|
def stats
|
||||||
def list_sas(match = nil, &block)
|
call("stats")
|
||||||
call_with_event("list-sas", Message.new(match), "list-sa", &block)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# List matching installed policies. The provided closure is invoked
|
# Reload strongswan.conf settings.
|
||||||
# for each matching policy.
|
def reload_settings
|
||||||
def list_policies(match, &block)
|
call("reload-settings")
|
||||||
call_with_event("list-policies", Message.new(match), "list-policy",
|
|
||||||
&block)
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# List matching loaded certificates. The provided closure is invoked
|
|
||||||
# for each matching certificate definition.
|
|
||||||
def list_certs(match = nil, &block)
|
|
||||||
call_with_event("list-certs", Message.new(match), "list-cert", &block)
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Load a connection into the daemon.
|
|
||||||
def load_conn(conn)
|
|
||||||
call("load-conn", Message.new(conn))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Unload a connection from the daemon.
|
|
||||||
def unload_conn(conn)
|
|
||||||
call("unload-conn", Message.new(conn))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Get the names of connections managed by vici.
|
|
||||||
def get_conns()
|
|
||||||
call("get-conns")
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Flush credential cache.
|
|
||||||
def flush_certs(match = nil)
|
|
||||||
call("flush-certs", Message.new(match))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Clear all loaded credentials.
|
|
||||||
def clear_creds()
|
|
||||||
call("clear-creds")
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Load a certificate into the daemon.
|
|
||||||
def load_cert(cert)
|
|
||||||
call("load-cert", Message.new(cert))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Load a private key into the daemon.
|
|
||||||
def load_key(key)
|
|
||||||
call("load-key", Message.new(key))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Load a shared key into the daemon.
|
|
||||||
def load_shared(shared)
|
|
||||||
call("load-shared", Message.new(shared))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Load a virtual IP / attribute pool
|
|
||||||
def load_pool(pool)
|
|
||||||
call("load-pool", Message.new(pool))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Unload a virtual IP / attribute pool
|
|
||||||
def unload_pool(pool)
|
|
||||||
call("unload-pool", Message.new(pool))
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
|
||||||
# Get the currently loaded pools.
|
|
||||||
def get_pools(options)
|
|
||||||
call("get-pools", Message.new(options))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
@@ -510,6 +433,12 @@ module Vici
|
|||||||
call_with_event("terminate", Message.new(options), "control-log", &block)
|
call_with_event("terminate", Message.new(options), "control-log", &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Initiate the rekeying of an SA.
|
||||||
|
def rekey(options)
|
||||||
|
call("rekey", Message.new(options))
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Redirect an IKE_SA.
|
# Redirect an IKE_SA.
|
||||||
def redirect(options)
|
def redirect(options)
|
||||||
@@ -529,21 +458,172 @@ module Vici
|
|||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Reload strongswan.conf settings.
|
# List matching active SAs. The provided closure is invoked for each
|
||||||
def reload_settings
|
# matching SA.
|
||||||
call("reload-settings")
|
def list_sas(match = nil, &block)
|
||||||
|
call_with_event("list-sas", Message.new(match), "list-sa", &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Get daemon statistics and information.
|
# List matching installed policies. The provided closure is invoked
|
||||||
def stats
|
# for each matching policy.
|
||||||
call("stats")
|
def list_policies(match, &block)
|
||||||
|
call_with_event("list-policies", Message.new(match), "list-policy",
|
||||||
|
&block)
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Get daemon version information
|
# List matching loaded connections. The provided closure is invoked
|
||||||
def version
|
# for each matching connection.
|
||||||
call("version")
|
def list_conns(match = nil, &block)
|
||||||
|
call_with_event("list-conns", Message.new(match), "list-conn", &block)
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get the names of connections managed by vici.
|
||||||
|
def get_conns()
|
||||||
|
call("get-conns")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# List matching loaded certificates. The provided closure is invoked
|
||||||
|
# for each matching certificate definition.
|
||||||
|
def list_certs(match = nil, &block)
|
||||||
|
call_with_event("list-certs", Message.new(match), "list-cert", &block)
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# List matching loaded certification authorities. The provided closure is
|
||||||
|
# invoked for each matching certification authority definition.
|
||||||
|
def list_authorities(match = nil, &block)
|
||||||
|
call_with_event("list-authorities", Message.new(match), "list-authority",
|
||||||
|
&block)
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get the names of certification authorities managed by vici.
|
||||||
|
def get_authorities()
|
||||||
|
call("get-authorities")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a connection into the daemon.
|
||||||
|
def load_conn(conn)
|
||||||
|
call("load-conn", Message.new(conn))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Unload a connection from the daemon.
|
||||||
|
def unload_conn(conn)
|
||||||
|
call("unload-conn", Message.new(conn))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a certificate into the daemon.
|
||||||
|
def load_cert(cert)
|
||||||
|
call("load-cert", Message.new(cert))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a private key into the daemon.
|
||||||
|
def load_key(key)
|
||||||
|
call("load-key", Message.new(key))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Unload a private key from the daemon.
|
||||||
|
def unload_key(key)
|
||||||
|
call("unload-key", Message.new(key))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get the identifiers of private keys loaded via vici.
|
||||||
|
def get_keys()
|
||||||
|
call("get-keys")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a private key located on a token into the daemon.
|
||||||
|
def load_token(token)
|
||||||
|
call("load-token", Message.new(token))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a shared key into the daemon.
|
||||||
|
def load_shared(shared)
|
||||||
|
call("load-shared", Message.new(shared))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Unload a shared key from the daemon.
|
||||||
|
def unload_shared(shared)
|
||||||
|
call("unload-shared", Message.new(shared))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get the unique identifiers of shared keys loaded via vici.
|
||||||
|
def get_shared()
|
||||||
|
call("get-shared")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Flush credential cache.
|
||||||
|
def flush_certs(match = nil)
|
||||||
|
call("flush-certs", Message.new(match))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Clear all loaded credentials.
|
||||||
|
def clear_creds()
|
||||||
|
call("clear-creds")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a certification authority into the daemon.
|
||||||
|
def load_authority(authority)
|
||||||
|
call("load-authority", Message.new(authority))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Unload a certification authority from the daemon.
|
||||||
|
def unload_authority(authority)
|
||||||
|
call("unload-authority", Message.new(authority))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Load a virtual IP / attribute pool into the daemon.
|
||||||
|
def load_pool(pool)
|
||||||
|
call("load-pool", Message.new(pool))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Unload a virtual IP / attribute pool from the daemon.
|
||||||
|
def unload_pool(pool)
|
||||||
|
call("unload-pool", Message.new(pool))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get the currently loaded pools.
|
||||||
|
def get_pools(options)
|
||||||
|
call("get-pools", Message.new(options))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get currently loaded algorithms and their implementation.
|
||||||
|
def get_algorithms()
|
||||||
|
call("get-algorithms")
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Get global or connection-specific counters for IKE events.
|
||||||
|
def get_counters(options = nil)
|
||||||
|
call("get-counters", Message.new(options))
|
||||||
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Reset global or connection-specific IKE event counters.
|
||||||
|
def reset_counters(options = nil)
|
||||||
|
call("reset-counters", Message.new(options))
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|||||||
Reference in New Issue
Block a user