Skip to content

Instantly share code, notes, and snippets.

@martinsotir
Last active October 6, 2020 09:18

Revisions

  1. martinsotir revised this gist Oct 6, 2020. 2 changed files with 3 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions c heck_openstack.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    def _is_host_openstack():
    product_name = Path("/sys/devices/virtual/dmi/id/product_name")
    return product_name.exists() and "OpenStack" in product_name.read_text()
    3 changes: 3 additions & 0 deletions check_openstack.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    def _is_host_openstack():
    product_name = Path("/sys/devices/virtual/dmi/id/product_name")
    return product_name.exists() and "OpenStack" in product_name.read_text()
  2. martinsotir created this gist Oct 6, 2020.
    3 changes: 3 additions & 0 deletions c heck_openstack.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    def _is_host_openstack():
    product_name = Path("/sys/devices/virtual/dmi/id/product_name")
    return product_name.exists() and "OpenStack" in product_name.read_text()