def get_config_policy(self): return snap.ConfigPolicy( [ ("diamond"), [ ("config", snap.StringRule(required=True)), ("collectors_path", snap.StringRule()) ] ] )
def get_config_policy(self): return snap.ConfigPolicy([ None, [ ("server_protocol", snap.StringRule(default='http')), ("server_name", snap.StringRule(required=True)), ("server_port", snap.IntegerRule(required=True)), ("request_uri", snap.StringRule()), ("batch_size", snap.IntegerRule(default=1000)), ("plugin_running_on", snap.StringRule(default=socket.getfqdn())), ] ], )
def get_config_policy(self): policy = [("acme", "sk8", "matix"), [ ( "password", snap.StringRule(default="grace", required=True), ), ( "user", snap.StringRule(default="kristy", required=True), ), ]] if self._args.require_config: policy[1].append(("database", snap.StringRule(required=True))) return snap.ConfigPolicy(policy)
def get_config_policy(self): """Get's the config policy The config policy for this plugin defines a string configuration item `instance-id` with the default value of `xyz-abc-qwerty`. """ return snap.ConfigPolicy([ None, [("instance-id", snap.StringRule(default="xyz-abc-qwerty"))] ])
def get_config_policy(self): return snap.ConfigPolicy( [ None, [ ( "some-config", snap.StringRule(default="some-value") ) ] ], )
def get_config_policy(self): policy = [("intel", "streaming", "random"), [ ( "stream_delay", snap.IntegerRule(default=1, required=True), ), ( "password", snap.StringRule(default="pass", required=True), ), ]] return snap.ConfigPolicy(policy)
def get_config_policy(self): LOG.debug("GetConfigPolicy called") return snap.ConfigPolicy( [ ("ironic-cups"), [ ( "transport_url", snap.StringRule( default='rabbit://*****:*****@rabbit:5672/', required=True) ), ] ] )
def get_config_policy(self): """As the name suggests this method returns the config policy for the plugin. This method is called by the Snap deamon when the plugin is loaded. A config policy describes the configuration key/value pairs that are required, optional, what the value type is and if there is a default value. In this example we returning a config policy that contains a `string` config item describing the location of the file that will be published to. The 'file' config item has a default which the user may choose to override. Returns: `snap_plugin.v1.GetConfigPolicyReply` """ LOG.debug("GetConfigPolicy called") return snap.ConfigPolicy( [None, [("file", snap.StringRule(default="/tmp/snap-py.out"))]], )