diff --git a/virtManager/connection.py b/virtManager/connection.py index 3b943ecd..3e90773b 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -77,14 +77,13 @@ class vmmConnection(vmmGObject): STATE_ACTIVE = 2 STATE_INACTIVE = 3 - def __init__(self, uri, readOnly=False): + def __init__(self, uri): vmmGObject.__init__(self) self._uri = uri if self._uri is None or self._uri.lower() == "xen": self._uri = "xen:///" - self.readOnly = readOnly self.state = self.STATE_DISCONNECTED self.connectThread = None self.connectError = None @@ -185,9 +184,6 @@ class vmmConnection(vmmGObject): # General data getters # ######################## - def is_read_only(self): - return self.readOnly - def get_uri(self): return self._uri @@ -602,10 +598,7 @@ class vmmConnection(vmmGObject): elif self.state == self.STATE_CONNECTING: return _("Connecting") elif self.state == self.STATE_ACTIVE: - if self.is_read_only(): - return _("Active (RO)") - else: - return _("Active") + return _("Active") elif self.state == self.STATE_INACTIVE: return _("Inactive") else: @@ -965,16 +958,10 @@ class vmmConnection(vmmGObject): return -1 def _try_open(self): - flags = 0 - vmm = self._open_dev_conn(self.get_uri()) if vmm: return vmm - if self.readOnly: - logging.info("Caller requested read only connection") - flags = libvirt.VIR_CONNECT_RO - if virtinst.support.support_openauth(): vmm = libvirt.openAuth(self.get_uri(), [[libvirt.VIR_CRED_AUTHNAME, @@ -983,10 +970,7 @@ class vmmConnection(vmmGObject): self._do_creds, None], flags) else: - if flags: - vmm = libvirt.openReadOnly(self.get_uri()) - else: - vmm = libvirt.open(self.get_uri()) + vmm = libvirt.open(self.get_uri()) return vmm diff --git a/virtManager/create.py b/virtManager/create.py index ccc4e6c5..2eccc846 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -415,12 +415,8 @@ class vmmCreate(vmmGObjectUI): def set_conn_state(self): # Update all state that has some dependency on the current connection - self.widget("create-forward").set_sensitive(True) - if self.conn.is_read_only(): - return self.startup_error(_("Connection is read only.")) - if self.conn.no_install_options(): error = _("No hypervisor options were found for this " "connection.") diff --git a/virtManager/domain.py b/virtManager/domain.py index 211045c2..9df1bba0 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -318,8 +318,6 @@ class vmmDomain(vmmLibvirtObject): return self.conn.rhel6_defaults(self.get_emulator()) def is_read_only(self): - if self.conn.is_read_only(): - return True if self.is_management_domain(): return True return False diff --git a/virtManager/util.py b/virtManager/util.py index f873b7e9..916ebe90 100644 --- a/virtManager/util.py +++ b/virtManager/util.py @@ -267,16 +267,12 @@ def dup_conn(conn): def _dup_all_conn(conn, libconn): - - is_readonly = False - if libconn: uri = libconn.getURI() is_test = uri.startswith("test") vmm = libconn else: is_test = conn.is_test_conn() - is_readonly = conn.is_read_only() uri = conn.get_uri() vmm = conn.vmm @@ -291,7 +287,7 @@ def _dup_all_conn(conn, libconn): return conn or vmm logging.debug("Duplicating connection for async operation.") - newconn = virtManager.connection.vmmConnection(uri, readOnly=is_readonly) + newconn = virtManager.connection.vmmConnection(uri) newconn.open(sync=True) return newconn