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

    API interface for managing Host Mac addresses

    Scheduled Pinned Locked Moved
    Feature Request
    2
    3
    457
    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.
    • J
      John Sartoris
      last edited by

      I’ve been looking into automatically adding certain mac addresses from my hosts and I have figured out how to use the API to import the list of macs and store them in the database, with the primary being the last entry.

      What I’m looking for is a way to manage the pending macs for cleanup and or to via API accept them so they are no longer pending. API access should also provide access to the “Ignore Mac on Client” and “Ignore Mac on Image” options.

      Would this be new or did I miss it somewhere?

      JJ FullmerJ 1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers @John Sartoris
        last edited by

        @John-Sartoris check out the powershell api module. See my signature for links.
        I have some functions that may already do what they want or can at least get you in the right direction. Check out these ones

        Get-PendingMacsForHost

        Approve-FogPendingMac

        Deny-FogPendingMac

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        1 Reply Last reply Reply Quote 0
        • JJ FullmerJ
          JJ Fullmer Testers
          last edited by

          I don’t have the ignore mac on client/imaging
          Setting built in to those functions, but you can take a peek at the code to see whrte you are setting the primary property there is also a property for ignoring mac on client. I’m on my phone at the moment so can’t go test and get for sure answers. But it’s either a part of thr maclist array of a host or a different property. Point is you can for sure set that. If you give me a bit more detail I will gladly try to give you further examples on how to do it with the powershell module

          Have you tried the FogApi powershell module? It's pretty cool IMHO
          https://github.com/darksidemilk/FogApi
          https://fogapi.readthedocs.io/en/latest/
          https://www.powershellgallery.com/packages/FogApi
          https://forums.fogproject.org/topic/12026/powershell-api-module

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

          262

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project