Giter VIP home page Giter VIP logo

Comments (11)

keithrob avatar keithrob commented on July 24, 2024

I think that probably the right way to do this under the new architecture is to have a *nix policy from which Redhat and Debian should extend. Then within the plug-ins that are *nixish you put the common parts into an inner class and the distro specific parts into distro specific classes that extend the base class. Very OOPish.

I'm wondering how the new class loader would handle it though. Need to try it and see.

linux policy
/
Deb Rhat policy

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

I like that idea, I think my main concern with the plugins now is that when you do a sosreport -l you'll see something like:

general does not validate basic system information
generalubuntu does not validate Basic system information for Ubuntu based distributions

Or
autofs
autofsubuntu

And some of the changes to the plugin may only require checking additional files or different file locations to capture the data.

from sos.

keithrob avatar keithrob commented on July 24, 2024

Yeah, that's ugly. Autofs should appear as "autofs" whether it's Ubuntu or Fedora.

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

I agree. Is there a public channel where you guys hangout at so we could possibly have a meeting to discuss some of these cross-distribution type ideas?

from sos.

jhjaggars avatar jhjaggars commented on July 24, 2024

[email protected] is probably the correct place for this discussion.

With regards to the original issue raised here, I think adding a method to the PackageManager interface makes sense in this case.

Platform specific versions of plugins should all have the same name. You can ensure this by defining a name() method on your plugin subclass.

We may want to change the Plugin superclass name() behavior from

return class.__name__.lower()

to

return class.__module__.lower()

That way it will be named after the module that contains the class by default (and to better adhere to DRY.)

I'm beginning to think that sosreport -l needs to be tweaked to hide plugins that are excluded because of platform issues unless you pass in a -v as well.

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

I attempted to add the name routine to my plugins but then there were not being listed as existing at all. I'll look into changing the name routine to your suggestion and see if that makes a difference

from sos.

jhjaggars avatar jhjaggars commented on July 24, 2024

I'd be interested in seeing what you have seen. What you describe sounds like a bug.

from sos.

keithrob avatar keithrob commented on July 24, 2024

We now have an IRC channel on OFTC.

irc.oftc.net
#sosreport

To Jessie, yah that makes sense. There is; however, still the ugly bit of hard-coded distro specific programs within plug-ins.

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

In verbose mode I dont see anything printed to stdout other than the plugins not showing up in --list-plugins

from sos.

jhjaggars avatar jhjaggars commented on July 24, 2024

I was suggesting we change the behavior of --list-plugins to only display plugins for the current distribution unless we also pass in -v.

I think that plugins are where the distro specific shell outs belong in many cases, package manager aside (since we have a ready abstraction for that). I would not be surprised if we come across more things that make sense to abstract away as we cover more platforms and distributions, and it makes sense to add those things as we discover them.

from sos.

adam-stokes avatar adam-stokes commented on July 24, 2024

I think we can close this since we've reworked the plugin infrastructure and I dont really see a pressing need to have this extra layer/routine.

from sos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.