Skip to content

Instantly share code, notes, and snippets.

@ytjohn
Created March 17, 2016 16:46
Show Gist options
  • Save ytjohn/860505af54e9392edc0c to your computer and use it in GitHub Desktop.
Save ytjohn/860505af54e9392edc0c to your computer and use it in GitHub Desktop.
omapi script
root@rackhd01:~/dhtest# salt-call omapi.add_host 08:00:27:bc:f8:89 name=pxe02 ip=192.168.37.206
local:
True
root@rackhd01:~/dhtest# salt-call omapi.add_host 08:00:27:bc:f8:89 name=pxe02 ip=192.168.37.200
local:
False
root@rackhd01:~/dhtest# salt-call omapi.delete_host 08:00:27:bc:f8:89
local:
True
root@rackhd01:~/dhtest# salt-call omapi.add_host 08:00:27:bc:f8:89 name=pxe02 ip=192.168.37.200
local:
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment