Changes to 'refs/tags/spacewalk-proxy-2.0.2-1'
by Michael Mraka
Tag 'spacewalk-proxy-2.0.2-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2013-09-02 09:32 +0000
Tagging package [spacewalk-proxy] version [2.0.2-1] in directory [proxy/proxy/].
Changes since spacewalk-java-2.0.5-1:
Michael Mraka (5):
1002007 - use mod_wsgi even on RHEL5
1002007 - python 2.4 HTTPConnection can't read directly from object
1002007 - don't send empty data
fixed pylint error
Automatic commit of package [spacewalk-proxy] release [2.0.2-1].
---
proxy/proxy/httpd-conf/spacewalk-proxy-python.conf | 86 ---------------------
proxy/proxy/rhnShared.py | 8 +
proxy/proxy/spacewalk-proxy.spec | 26 +-----
rel-eng/packages/spacewalk-proxy | 2
4 files changed, 13 insertions(+), 109 deletions(-)
---
10 years, 7 months
Branch 'SPACEWALK-2.0' - 5 commits - proxy/proxy rel-eng/packages
by Michael Mraka
proxy/proxy/httpd-conf/spacewalk-proxy-python.conf | 86 ---------------------
proxy/proxy/rhnShared.py | 8 +
proxy/proxy/spacewalk-proxy.spec | 26 +-----
rel-eng/packages/spacewalk-proxy | 2
4 files changed, 13 insertions(+), 109 deletions(-)
New commits:
commit 9e1eb18c855f993c55dfb49ae1f68bcbcef49a3b
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Mon Sep 2 11:32:44 2013 +0200
Automatic commit of package [spacewalk-proxy] release [2.0.2-1].
diff --git a/proxy/proxy/spacewalk-proxy.spec b/proxy/proxy/spacewalk-proxy.spec
index ab43658..ccf32d8 100644
--- a/proxy/proxy/spacewalk-proxy.spec
+++ b/proxy/proxy/spacewalk-proxy.spec
@@ -4,7 +4,7 @@ Group: Applications/Internet
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 2.0.1
+Version: 2.0.2
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
@@ -311,6 +311,11 @@ fi
%changelog
+* Mon Sep 02 2013 Michael Mraka <michael.mraka(a)redhat.com> 2.0.2-1
+- 1002007 - don't send empty data
+- 1002007 - python 2.4 HTTPConnection can't read directly from object
+- 1002007 - use mod_wsgi even on RHEL5
+
* Wed Jul 17 2013 Tomas Kasparek <tkasparek(a)redhat.com> 2.0.1-1
- Bumping package versions for 2.0.
diff --git a/rel-eng/packages/spacewalk-proxy b/rel-eng/packages/spacewalk-proxy
index 651d1fe..dff4411 100644
--- a/rel-eng/packages/spacewalk-proxy
+++ b/rel-eng/packages/spacewalk-proxy
@@ -1 +1 @@
-2.0.1-1 proxy/proxy/
+2.0.2-1 proxy/proxy/
commit 83354a39706cdeedd7ca3d8b6cbf8db5d24c75ea
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 30 14:38:00 2013 +0200
fixed pylint error
(cherry picked from commit eaaa9d48395d4b1b706ee0b48d366f66e9926fda)
diff --git a/proxy/proxy/rhnShared.py b/proxy/proxy/rhnShared.py
index 81e76aa..38017ee 100644
--- a/proxy/proxy/rhnShared.py
+++ b/proxy/proxy/rhnShared.py
@@ -363,7 +363,7 @@ class SharedHandler:
# Send the body too if there is a body
if size > 0:
- if sys.version_info < (2,6):
+ if sys.version_info < (2, 6):
data = self.req.headers_in['wsgi.input'].read(size)
else:
data = self.req.headers_in['wsgi.input']
commit c3713afe87701ee301f3a5583eca442e3fb4688a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 30 14:24:06 2013 +0200
1002007 - don't send empty data
addressing
Traceback (most recent call last):
File "/usr/share/rhn/proxy/apacheServer.py", line 62, in __call__
ret = f(req)
File "/usr/share/rhn/proxy/apacheHandler.py", line 355, in handler
ret = handlerObj.handler()
File "/usr/share/rhn/proxy/redirect/rhnRedirect.py", line 92, in handler
status = self._serverCommo() # part 2
File "/usr/share/rhn/proxy/rhnShared.py", line 201, in _serverCommo
status, headers, bodyFd = self._proxy2server()
File "/usr/share/rhn/proxy/rhnShared.py", line 370, in _proxy2server
http_connection.send(data)
File "/usr/lib64/python2.4/httplib.py", line 664, in send
self.sock.sendall(str)
File "/usr/lib/python2.4/site-packages/rhn/SSL.py", line 217, in write
sent = self._connection.send(data)
SysCallError: (-1, 'Unexpected EOF')
(cherry picked from commit cd5f85734304214dc40470b5e4ef6b96c89ffc47)
diff --git a/proxy/proxy/rhnShared.py b/proxy/proxy/rhnShared.py
index 43b931f..81e76aa 100644
--- a/proxy/proxy/rhnShared.py
+++ b/proxy/proxy/rhnShared.py
@@ -362,7 +362,7 @@ class SharedHandler:
http_connection.endheaders()
# Send the body too if there is a body
- if size != 0:
+ if size > 0:
if sys.version_info < (2,6):
data = self.req.headers_in['wsgi.input'].read(size)
else:
commit d8ababbdaae305d5ebc28d8082e7a40b9c48d1be
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 30 14:20:32 2013 +0200
1002007 - python 2.4 HTTPConnection can't read directly from object
(cherry picked from commit a668455d94efcbba5de8c44930d01d27448c81fe)
diff --git a/proxy/proxy/rhnShared.py b/proxy/proxy/rhnShared.py
index 82ddb16..43b931f 100644
--- a/proxy/proxy/rhnShared.py
+++ b/proxy/proxy/rhnShared.py
@@ -363,7 +363,11 @@ class SharedHandler:
# Send the body too if there is a body
if size != 0:
- http_connection.send(self.req.headers_in['wsgi.input'])
+ if sys.version_info < (2,6):
+ data = self.req.headers_in['wsgi.input'].read(size)
+ else:
+ data = self.req.headers_in['wsgi.input']
+ http_connection.send(data)
# At this point everything is sent to the server
# We now wait for the response
commit 886d9b5ff56c275e249a06fdd04736f6aa06b7b8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 30 09:51:57 2013 +0200
1002007 - use mod_wsgi even on RHEL5
(cherry picked from commit 34c3e9c2c0177345a8f0c0ce2a2a9757e136ec67)
diff --git a/proxy/proxy/httpd-conf/spacewalk-proxy-python.conf b/proxy/proxy/httpd-conf/spacewalk-proxy-python.conf
deleted file mode 100644
index 884cbe4..0000000
--- a/proxy/proxy/httpd-conf/spacewalk-proxy-python.conf
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Spacewalk proxy
-#
-
-<LocationMatch "^/*">
- # this stanza contains all the handlers for RHN app code
-
- # added for oracle
- SetEnv NLS_LANG english.UTF8
-
- # mod_python
- <IfModule !mod_python.c>
- LoadModule python_module modules/mod_python.so
- AddModule mod_python.c
- </IfModule>
-
- PythonPath "sys.path+['/usr/share/rhn']"
- PythonDebug Off
-
- SetHandler python-program
- # all of these handlers are defined in apacheServer
- PythonHeaderParserHandler proxy.apacheServer::HeaderParserHandler
- PythonHandler proxy.apacheServer::Handler
- PythonCleanupHandler proxy.apacheServer::CleanupHandler
- DefaultType text/xml
-
- DirectoryIndex _rhn_proxy/index.html index.html index.htm index.html.var index.shtml index.php index.php4 index.php3 index.phtml index.cgi
-
-</LocationMatch>
-
-#
-# Spacewalk proxy broker
-#
-
-<Location /XMLRPC>
- SetHandler python-program
- # all of these handlers are defined in apacheServer
- PythonHeaderParserHandler proxy.apacheServer::HeaderParserHandler
- PythonHandler proxy.apacheServer::Handler
- PythonCleanupHandler proxy.apacheServer::CleanupHandler
- PythonOption RHNComponentType proxy.broker
- DefaultType text/xml
- # Uncomment (and edit) the following to limit access to this proxy's
- # services
- #<Limit GET POST>
- # Order allow,deny
- # Allow from goodguys.com
- #</Limit>
-</Location>
-
-#
-# Spacewalk proxy SSL redirect
-#
-
-<Location /XMLRPC_SSL>
- SetHandler python-program
- # all of these handlers are defined in apacheServer
- PythonHeaderParserHandler proxy.apacheServer::HeaderParserHandler
- PythonHandler proxy.apacheServer::Handler
- PythonCleanupHandler proxy.apacheServer::CleanupHandler
- PythonOption RHNComponentType proxy.redirect
- DefaultType text/xml
- # Uncomment (and edit) the following to limit access to this proxy's
- # services
- #<Limit GET POST>
- # Order allow,deny
- # Allow from goodguys.com
- #</Limit>
-</Location>
-
-<Location /XMLRPC_REDIRECT>
- SetHandler python-program
- # all of these handlers are defined in apacheServer
- PythonHeaderParserHandler proxy.apacheServer::HeaderParserHandler
- PythonHandler proxy.apacheServer::Handler
- PythonCleanupHandler proxy.apacheServer::CleanupHandler
- PythonOption RHNComponentType proxy.redirect
- DefaultType text/xml
- # Uncomment (and edit) the following to limit access to this proxy's
- # services
- #<Limit GET POST>
- # Order allow,deny
- # Allow from goodguys.com
- #</Limit>
-</Location>
-
diff --git a/proxy/proxy/spacewalk-proxy.spec b/proxy/proxy/spacewalk-proxy.spec
index 7e082ac..ab43658 100644
--- a/proxy/proxy/spacewalk-proxy.spec
+++ b/proxy/proxy/spacewalk-proxy.spec
@@ -72,11 +72,7 @@ Requires: spacewalk-proxy-package-manager
Requires: spacewalk-ssl-cert-check
Requires: httpd
Requires: mod_ssl
-%if 0%{?rhel} && 0%{?rhel} < 6
-Requires: mod_python
-%else
Requires: mod_wsgi
-%endif
Requires(post): %{name}-common
Conflicts: %{name}-redirect < %{version}-%{release}
Conflicts: %{name}-redirect > %{version}-%{release}
@@ -116,11 +112,7 @@ between an Spacewalk Proxy Server and parent Spacewalk server.
Group: Applications/Internet
Summary: Modules shared by Spacewalk Proxy components
Requires: mod_ssl
-%if 0%{?rhel} && 0%{?rhel} < 6
-Requires: mod_python
-%else
Requires: mod_wsgi
-%endif
Requires: %{name}-broker >= %{version}
Requires: spacewalk-backend >= 1.7.24
Requires: policycoreutils
@@ -172,13 +164,6 @@ mkdir -p $RPM_BUILD_ROOT/%{_var}/spool/rhn-proxy/list
touch $RPM_BUILD_ROOT/%{httpdconf}/cobbler-proxy.conf
-%if 0%{?rhel} && 0%{?rhel} < 6
-rm -fv $RPM_BUILD_ROOT%{httpdconf}/spacewalk-proxy-wsgi.conf
-rm -rfv $RPM_BUILD_ROOT%{rhnroot}/wsgi/
-%else
-rm -fv $RPM_BUILD_ROOT%{httpdconf}/spacewalk-proxy-python.conf
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -301,13 +286,9 @@ fi
%attr(644,root,apache) %config %{httpdconf}/spacewalk-proxy.conf
# this file is created by either cli or webui installer
%ghost %config %{httpdconf}/cobbler-proxy.conf
-%if 0%{?rhel} && 0%{?rhel} < 6
-%attr(644,root,apache) %config %{httpdconf}/spacewalk-proxy-python.conf
-%else
%attr(644,root,apache) %config %{httpdconf}/spacewalk-proxy-wsgi.conf
%{rhnroot}/wsgi/xmlrpc.py*
%{rhnroot}/wsgi/xmlrpc_redirect.py*
-%endif
# the cache
%attr(750,apache,root) %dir %{_var}/cache/rhn
%attr(750,apache,root) %dir %{_var}/cache/rhn/proxy-auth
10 years, 7 months
2 commits - java/code web/modules
by Tomáš Kašpárek
java/code/src/com/redhat/rhn/common/db/datasource/test/AdvDataSourceTest.java | 4
java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java | 4
java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java | 4
web/modules/dobby/scripts/check-database-space-usage.sh | 46 +---------
4 files changed, 11 insertions(+), 47 deletions(-)
New commits:
commit 17eda3b9ef1f086c6d75dd7bf894c400a93d3272
Author: Dimitar Yordanov <dyordano(a)redhat.com>
Date: Mon Aug 26 15:34:43 2013 +0200
993978 - removing oracle specific code
as oracle is no longer supported by db-control the oracle specific code can be now safely removed
diff --git a/web/modules/dobby/scripts/check-database-space-usage.sh b/web/modules/dobby/scripts/check-database-space-usage.sh
index be067c4..0b11753 100755
--- a/web/modules/dobby/scripts/check-database-space-usage.sh
+++ b/web/modules/dobby/scripts/check-database-space-usage.sh
@@ -17,32 +17,6 @@
PATH=/usr/bin:/bin
export PATH
-get_db_backend() {
- if [ ! -e /usr/bin/spacewalk-cfg-get ]; then
- if [ x$(grep db_backend /etc/rhn/rhn.conf | awk '{print $3}') = x"postgresql" ]; then
- echo "postgresql"
- else
- echo "oracle"
- fi
- else
- if [ x$(spacewalk-cfg-get db_backend) = x"postgresql" ]; then
- echo "postgresql"
- else
- echo "oracle"
- fi
- fi
-}
-
-reportusage() {
- # both command produce percent as 5th field and first row is header, which is ignored
- if [ x"$(get_db_backend)" = x"postgresql" ]; then
- df -hP /var/lib/pgsql/data/
- else
- # don't report UNDO usage
- /sbin/runuser oracle -c "db-control report" | grep -E -v 'UNDO|TEMP'
- fi
-}
-
mailitout() {
local reportusage=$1
@@ -52,28 +26,18 @@ mailitout() {
MAILADDRESS=$(spacewalk-cfg-get traceback_mail)
fi
- if [ x$(get_db_backend) = x"postgresql" ]; then
- SUBJECT="Warning - PostgreSQL database mount point is running out of space"
- BODY="This is a notice to let you know that you have gone over 90% usage of
+ SUBJECT="Warning - PostgreSQL database mount point is running out of space"
+ BODY="This is a notice to let you know that you have gone over 90% usage of
the mount point where the PostgreSQL database resides. We recommend to be
proactive and increase the storage before getting to 100% usage."
- else
- SUBJECT="Warning - high tablespace usage on Satellite oracle DB"
-
- BODY="This is a notice to let you know that you have gone over 90% usage in
-one of the Oracle Tablespaces. We recommend to be proactive and increase the
-size of the tablespace before getting to 100% usage. Please consult
-the Satellite documentation on using db-control to increase the size or
-contact Red Hat Support for assistance."
- fi
echo -e "$BODY\n\n$reportusage" | mail -s "$SUBJECT" $MAILADDRESS
exit 0
}
-#grab the usage numbers from the db-control report output
-REPORTUSAGE=$(reportusage)
+
+REPORTUSAGE=$(df -hP /var/lib/pgsql/data/)
NUMBERS=$(echo "$REPORTUSAGE" | awk '{if (FNR > 1) {sub("%",""); print $5}}')
-# run db-control and then use awk and sed to get the % numbers
+
for num in $NUMBERS
do
# if number is over 90% then send warning email
commit a360d239a149588b8a338ce4131a5e9498ccc58a
Author: Silvio Moioli <smoioli(a)suse.de>
Date: Mon Sep 2 10:00:48 2013 +0200
common.db.datasource tests: get database username from configuration file
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/test/AdvDataSourceTest.java b/java/code/src/com/redhat/rhn/common/db/datasource/test/AdvDataSourceTest.java
index 5de2473..915c0b5 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/test/AdvDataSourceTest.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/test/AdvDataSourceTest.java
@@ -15,6 +15,7 @@
package com.redhat.rhn.common.db.datasource.test;
import com.redhat.rhn.common.ObjectCreateWrapperException;
+import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.db.datasource.CallableMode;
import com.redhat.rhn.common.db.datasource.DataResult;
@@ -60,12 +61,11 @@ public class AdvDataSourceTest extends RhnBaseTestCase {
super(name);
if (ConfigDefaults.get().isOracle()) {
db_sufix = "_or";
- db_user = "SPACEUSER";
}
else {
db_sufix = "_pg";
- db_user = "spaceuser";
}
+ db_user = Config.get().getString(ConfigDefaults.DB_USER);
}
private void lookup(String foobar, int id, int size) {
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
index 4a135e6..c371b08 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataListTest.java
@@ -19,6 +19,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.db.datasource.DataList;
import com.redhat.rhn.common.db.datasource.DataResult;
@@ -37,12 +38,11 @@ public class DataListTest extends RhnBaseTestCase {
public void setUp() {
if (ConfigDefaults.get().isOracle()) {
db_sufix = "_or";
- db_user = "SPACEUSER";
}
else {
db_sufix = "_pg";
- db_user = "spaceuser";
}
+ db_user = Config.get().getString(ConfigDefaults.DB_USER);
hsm = new HookedSelectMode(
ModeFactory.getMode("test_queries", "user_tables" + db_sufix));
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
index fd00cfd..b267e12 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/test/DataSourceParserTest.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.common.db.datasource.test;
+import com.redhat.rhn.common.conf.Config;
import com.redhat.rhn.common.conf.ConfigDefaults;
import com.redhat.rhn.common.db.datasource.CachedStatement;
import com.redhat.rhn.common.db.datasource.DataResult;
@@ -46,12 +47,11 @@ public class DataSourceParserTest extends RhnBaseTestCase {
public DataSourceParserTest() {
if (ConfigDefaults.get().isOracle()) {
db_sufix = "_or";
- db_user = "SPACEUSER";
}
else {
db_sufix = "_pg";
- db_user = "spaceuser";
}
+ db_user = Config.get().getString(ConfigDefaults.DB_USER);
}
public void testGetModes() throws Exception {
10 years, 7 months
Changes to 'refs/tags/spacecmd-2.1.7-1'
by aparsons
Tag 'spacecmd-2.1.7-1' created by Aron Parsons <aronparsons(a)gmail.com> at 2013-09-02 08:57 +0000
Tagging package [spacecmd] version [2.1.7-1] in directory [spacecmd/].
Changes since spacewalk-proxy-2.1.10-1:
Aron Parsons (4):
spacecmd: fix invalid call to user_confirm in activationkey_setconfigchannelorder
spacecmd: added function activationkey_setdescription
spacecmd: try to use a cached session even if the username is passed on the command line
Automatic commit of package [spacecmd] release [2.1.7-1].
Dimitar Yordanov (2):
906315 - Links in API documentation
966644 - update the sw-clone-by-date man page
Tomas Lestach (1):
1002912 - fix Systems Subscribed column on the /rhn/channels/software/Entitlements.do page
---
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 2
java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java | 9 ++-
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 9 ++-
spacecmd/src/lib/activationkey.py | 29 +++++++++-
spacecmd/src/lib/misc.py | 8 +-
utils/spacewalk-clone-by-date.sgml | 2
7 files changed, 48 insertions(+), 13 deletions(-)
---
10 years, 7 months
4 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 9 ++++++++-
spacecmd/src/lib/activationkey.py | 29 +++++++++++++++++++++++++++--
spacecmd/src/lib/misc.py | 8 ++++----
4 files changed, 40 insertions(+), 8 deletions(-)
New commits:
commit ebe24ae9428f7603a37fd9ddcfc56f54c43a8004
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Mon Sep 2 04:57:49 2013 -0400
Automatic commit of package [spacecmd] release [2.1.7-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index beb7484..0bd3b88 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-2.1.6-1 spacecmd/
+2.1.7-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 480a7d2..47dab6b 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 2.1.6
+Version: 2.1.7
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -64,6 +64,13 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Mon Sep 02 2013 Aron Parsons <aronparsons(a)gmail.com> 2.1.7-1
+- spacecmd: try to use a cached session even if the username is passed on the
+ command line
+- spacecmd: added function activationkey_setdescription
+- spacecmd: fix invalid call to user_confirm in
+ activationkey_setconfigchannelorder
+
* Sun Aug 25 2013 Aron Parsons <aronparsons(a)gmail.com> 2.1.6-1
- spacecmd: remove duplicate packages in system_listupgrades output
- spacecmd: make the keys used in latest_pkg() configurable
commit 8ec324a073a2863dd8c1e5381dc765ccf3e046e0
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Mon Sep 2 04:56:28 2013 -0400
spacecmd: try to use a cached session even if the username is passed on the command line
previously, if -u was used to pass a username on the command line, spacecmd
would always prompt for a password.
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 21d2806..e84b88a 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -233,6 +233,9 @@ def do_login(self, args):
elif self.config.has_key('username'):
# use the username from before
username = self.config['username']
+ elif self.options.username:
+ # use the username from before
+ username = self.options.username
else:
username = ''
@@ -277,10 +280,7 @@ def do_login(self, args):
session_file = os.path.join(self.conf_dir, server, 'session')
# retrieve a cached session
- # (skip this if username and password are provided on the command line)
- if os.path.isfile(session_file) \
- and not self.options.username \
- and not self.options.password:
+ if os.path.isfile(session_file) and not self.options.password:
try:
sessionfile = open(session_file, 'r')
commit 2357ad693d8a1778e3e9253cf7ce6cc6b908eab0
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Mon Sep 2 04:52:05 2013 -0400
spacecmd: added function activationkey_setdescription
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index b2504fd..f6024cd 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -1488,4 +1488,31 @@ def do_activationkey_enable(self, args):
for akey in keys:
self.client.activationkey.setDetails(self.session, akey, details)
+####################
+
+def help_activationkey_setdescription(self):
+ print 'activationkey_setdescription: Set the activation key description'
+ print
+ print 'usage: activationkey_setdescription KEY DESCRIPTION'
+
+def complete_activationkey_setdescription(self, text, line, beg, end):
+ parts = line.split(' ')
+
+ if len(parts) <= 2:
+ return tab_completer(self.do_activationkey_list('', True), text)
+
+def do_activationkey_setdescription(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args) >= 2:
+ self.help_activationkey_setdescription()
+ return
+
+ akey = args.pop(0)
+ description = ' '.join(args)
+
+ details = { 'description' : description }
+
+ self.client.activationkey.setDetails(self.session, akey, details)
+
# vim:ts=4:expandtab:
commit c4155057f7e275d926f4e2e74e0e8ac527f8cd67
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Mon Sep 2 04:48:23 2013 -0400
spacecmd: fix invalid call to user_confirm in activationkey_setconfigchannelorder
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 6ece381..b2504fd 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -562,8 +562,6 @@ def do_activationkey_setconfigchannelorder(self, args):
for i in range(len(new_channels)):
print '[%i] %s' % (i + 1, new_channels[i])
- if not user_confirm(self): return
-
self.client.activationkey.setConfigChannels(self.session,
[key],
new_channels)
10 years, 7 months