original_docstring: Check if the bridge exists and make sure it is up.
docstring: Check if the bridge exists and make sure it is up.
docstring_tokens: Check if the bridge exists and make sure it is up .
code: def _bridge_exists_and_ensure_up(self, bridge_name):
          """Check if the bridge exists and make sure it is up."""
          br = ip_lib.IPDevice(bridge_name)
          br.set_log_fail_as_error(False)
          try:
              # If the device doesn't exist this will throw a RuntimeError
              br.link.set_up()
          except RuntimeError:
              return False
          return True
code_tokens: def _bridge_exists_and_ensure_up ( self , bridge_name ) : br = ip_lib . IPDevice ( bridge_name ) br . set_log_fail_as_error ( False ) try : br . link . set_up ( ) except RuntimeError : return False return True
short_docstring: Check if the bridge exists and make sure it is up.
short_docstring_tokens: Check if the bridge exists and make sure it is up .
comment: """Check if the bridge exists and make sure it is up."""$SEP$# If the device doesn't exist this will throw a RuntimeError