• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    1.6 Hooks and their relevant Tie Ins

    Scheduled Pinned Locked Moved
    General
    2
    4
    771
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tom ElliottT
      Tom Elliott
      last edited by

      Here’s a couple of quick and dirty txt files containing all the hook events, and their respective tie-ins for plugins or hooks for operationally using them.

      I’m posting this because the AccessControl plugins uses these very emphatically to help with granularly controlling access. This, ultimately, means a full documentation of all the things that can be done natively.

      One file is the “Core” events. These are the events that can be enacted upon and integrated directly with the “base” of FOG using no plugins. The other file is all the hooks that plugins also generate.

      My hope is to get the access control plugin more on a dynamic nature than a guessing game. In the past I had tried documenting all the hook events into the database, and while this approach can work, it only inserts new entries when the event is to be processed in the first place.

      What’s wrong with the above approach? Well, to limit constant read/write to the database, the hooks were only inserted into the database as they were spawned. So let’s just say, for example, you never visited the User page. Your hookEvent’s table would never contain any of the hooks that are available on the user page.

      In these files, particularly the core file, is some commonalities between all pages I think. This will be evident just by looking at these files. A couple of places, however, use a generic approach to generate the event. These are using a % symbol to symbolize Host, Group, User, etc…

      Some of these will also function for the Plugins too (just a note).

      Hopefully this will help prepare people with some of our changes for when 1.6 is able to be published.

      Hooks_And_Tie-ins.txt

      Hooks_And_Tie-ins - Plugins.txt

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      imt_fogI 1 Reply Last reply Reply Quote 2
      • imt_fogI
        imt_fog @Tom Elliott
        last edited by

        @Tom-Elliott
        Hi Tom, I am just starting to develop an internal plugin for some data we need to handle for our client computers and want to assign to hosts and groups, so that this data can be accesed both via FOG management and FOG API so that we have this info to be used in our snapins.

        I did not go very deeply into the sources of FOG yet and just started by checking the example plugin and some other plugins to get a feeling how to do things, (coming from the Laravel world…).

        As I am not familiar with all the hook-event thing yet: does your post mean there are any significant changes in the plugin system coming in 1.6 - at least changes which would break a plugin developed using 1.5.x?

        Tom ElliottT 1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @imt_fog
          last edited by

          @imt_fog the information in these files are specific to 1.6 as I’m not sure what was present for 1.5.x, of course I can get them but for the most part things are similar or as much as I could make them.

          I couldn’t tell you what those changes are and I believe, for the most part, the majority are the same. There’s of course bound to be a few changes and I don’t think it would be too difficult to update your plugin for 1.6 when it is published. Of course I’ll be available to help out if needed as well.

          There actually is a new plugin being worked on right now that I fully integrated into 1.6 and is being worked separately for 1.5.x, so I think most things will be simple enough to see the differences.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          imt_fogI 1 Reply Last reply Reply Quote 0
          • imt_fogI
            imt_fog @Tom Elliott
            last edited by

            @Tom-Elliott ok thank you. We are starting with doing only some basic things, so I will just continue to get it up and running on 1.5.x.

            Right now, I am using the doxygen generated focdoc/ folder and mostly some examples in other plugins. Sometimes a bit tricky, but IMHO no need to generate the files for 1.5

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            150

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project