// Rsyslog returns an object that provides access to the Rsyslog API // facade. The id argument is reserved for future use and currently needs to // be empty. func (r *srvRoot) Rsyslog(id string) (*rsyslog.RsyslogAPI, error) { if id != "" { // Safeguard id for possible future use. return nil, common.ErrBadId } return rsyslog.NewRsyslogAPI(r.srv.state, r.resources, r) }
func (s *rsyslogSuite) SetUpTest(c *gc.C) { s.JujuConnSuite.SetUpTest(c) s.authorizer = apiservertesting.FakeAuthorizer{ LoggedIn: true, EnvironManager: true, } s.resources = common.NewResources() api, err := rsyslog.NewRsyslogAPI(s.State, s.resources, s.authorizer) c.Assert(err, gc.IsNil) s.EnvironWatcherTest = commontesting.NewEnvironWatcherTest( api, s.State, s.resources, commontesting.NoSecrets) }