1

brand new to python here so bear with me please. I am creating a script that has to perform backups for various devices. I have the following code:

def getOS():
if platform.system().upper() == 'JUNOS' :
    os = "junos"
elif platform.system().upper() == "WIN32"
    os = "windows"
elif platform.system().upper() == "DARWIN"
    os = "mac"
return os

How can I test for Big-IP? Additionally is there a list somewhere of the potential results for platform.system()?

I'm aware of the similar post here and here, however I'm looking for specifically Big-IP

shelton320
  • 11
  • 2
  • Possible duplicate of [What are the potential results for platform.system()](https://stackoverflow.com/questions/31107019/what-are-the-potential-results-for-platform-system) – ltd9938 Jun 29 '18 at 13:46

2 Answers2

0

platform.system() returns the uname system call. There is no DEFINITE return, it 100% relies on the OS.

Here is some more info on uname

Your best course of action would probably be running platform.system() on a Big-IP OS.

ltd9938
  • 1,444
  • 1
  • 15
  • 29
  • I do not currently have access to one, I am hoping someone else has done this previously and knows the result @ltd9938 – shelton320 Jun 29 '18 at 14:07
0

To see the TMOS version, you would run tmsh show sys software.

root@(ltm3)(cfg-sync Standalone)(Active)(/Common)(tmos)# show sys software

--------------------------------------------------
Sys::Software Status
Volume  Product   Version  Build  Active    Status
--------------------------------------------------
HD1.1    BIG-IP  13.1.0.5  0.0.5     yes  complete
HD1.2    BIG-IP  12.1.3.3  0.0.1      no  complete
HD1.3      none      none   none      no  complete
Jason Rahm
  • 670
  • 3
  • 14