Skip to content

Commit 563a9dd

Browse files
committed
Added note on setting mac address description via the api
1 parent 60e9c92 commit 563a9dd

File tree

2 files changed

+42
-10
lines changed

2 files changed

+42
-10
lines changed

docs/assets/css/custom.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

2-
/* unsure if these role classes will be able to be recreated in mkdocs material, or rather if they even need to be as other methods of coloring text are provided, commenting them out for now*/
2+
/* these color classes can be added to markdown in mkdocs material by adding the class after bold or italic texts i.e. __Required__{ .red } will be bold and red, however this format is not supported in obsidian*/
33
/* Class for red role */
4-
/* .red {
4+
.red {
55
color: red;
6-
} */
6+
}
77
/* Class for orange role */
8-
/* .orange {
8+
.orange {
99
color: orange;
10-
} */
11-
/* Class for yeloowrole */
12-
/* .yellow {
10+
}
11+
/* Class for yelowrole */
12+
.yellow {
1313
color: yellow;
14-
} */
14+
}
1515
/* Override default theme max width of 800px so wide screens can view more content responsively
1616
.wy-nav-content {
1717
max-width: 1500px;

docs/management/web/hosts.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ Tutorial](http://freeghost.sourceforge.net/videotutorials/addimghost.html)
106106

107107
------------------------------------------------------------------------
108108

109-
#### [Required]{.red} Fields
109+
#### __Required__{ .red } Fields
110110

111-
A host consists of the following [Required]{.red} Fields:
111+
A host consists of the following __Required__{ .red } Fields:
112112

113113
##### Hostname
114114

@@ -121,6 +121,38 @@ A host consists of the following [Required]{.red} Fields:
121121
> string must be separated by `:` (colon), in the format of
122122
> `00:11:22:33:44:55`.
123123
124+
> [!NOTE]
125+
> The MAC Address has a description field. This can currently only be set via the api and can be whatever you want it to be.
126+
> For example you could use the [FOGApi powershell module](https://github.com/darksidemilk/FogApi) to set the mac descriptions to the make/model of the adapter like so
127+
128+
```
129+
$fogHost = Get-FogHost
130+
$fogHostMacs = Get-FogHostMacs -hostid $foghost.id;
131+
$fogHostMacs | ForEach-Object {
132+
$fogmac = $_;
133+
$netAdapter = Get-NetAdapter -IncludeHidden | Where-Object macaddress -eq $fogmac.mac.replace(":","-");
134+
if ($Null -ne $netAdapter) {
135+
$fogMac.description = "$($netAdapter.name) - $($netAdapter.InterfaceDescription)"
136+
Update-FogObject -type object -coreObject macaddressassociation -jsonData ($fogMac | convertto-json) -IDofObject $fogmac.id -vb
137+
}
138+
}
139+
```
140+
141+
This does a POST to `{fogurl}/fog/macaddressassociation/{macID}/edit` with a json formatted like the following for each mac address on a windows machine that already exists in FOG.
142+
143+
```
144+
{
145+
"id": 6355,
146+
"hostID": 1847,
147+
"mac": "f4:a4:75:ab:93:d4",
148+
"description": "Wi-Fi - Intel(R) Wi-Fi 6E AX210 160MHz",
149+
"pending": "0",
150+
"primary": "0",
151+
"clientIgnore": "0",
152+
"imageIgnore": "0"
153+
}
154+
```
155+
124156
------------------------------------------------------------------------
125157

126158
#### Optional Fields

0 commit comments

Comments
 (0)