Browse files

Add cloud servers support to onelog

  • Loading branch information...
1 parent 72c065d commit c3da1ef1699a0f750de0a81bf80f9c5cdff5bc67 @dmamolina dmamolina committed Jul 16, 2012
Showing with 71 additions and 6 deletions.
  1. +13 −4 README.md
  2. +58 −2 onelog
View
17 README.md
@@ -26,8 +26,17 @@ Commands
onelog
------
-If no argument is passed it displays `oned.log`. If a `VM_ID` is passed as a
-paramenter, the vm.log is displayed:
+If no argument is passed it displays `oned.log`. One of these arguments can be passed:
+
+- `econe`: econe-server.log
+- `econe.error`: econe-server.error
+- `occi`: occi-server.log
+- `occi.error`: occi-server.error
+- `sunstone`: sunstone-server.log
+- `sunstone.error`: sunstone-server.error
+- `ozones`: ozones-server.log
+- `ozones.error`: ozones-server.error
+- `VM_ID`: the vm.log is displayed
$ onelog
[ opens oned.log in your $PAGER ]
@@ -86,12 +95,12 @@ parameter is passed to the script, it will be used as the username.
# To the same username
$ onessh-copy-id 9
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
- user@192.168.1.10's password:
+ user@192.168.1.10's password:
# To a different username
$ onessh-copy-id 9 root
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
- root@192.168.1.10's password:
+ root@192.168.1.10's password:
onevnc
------
View
60 onelog
@@ -4,13 +4,69 @@ PAGER=${PAGER:-less}
if [ -n "$ONE_LOCATION" ]; then
if [ -n "$1" ]; then
- $PAGER $ONE_LOCATION/var/$1/vm.log
+ case "$1" in
+ econe)
+ $PAGER $ONE_LOCATION/var/econe-server.log
+ ;;
+ econe.error)
+ $PAGER $ONE_LOCATION/var/econe-server.error
+ ;;
+ sunstone)
+ $PAGER $ONE_LOCATION/var/sunstone.log
+ ;;
+ sunstone.error)
+ $PAGER $ONE_LOCATION/var/sunstone.error
+ ;;
+ occi)
+ $PAGER $ONE_LOCATION/var/occi-server.log
+ ;;
+ occi.error)
+ $PAGER $ONE_LOCATION/var/occi-server.error
+ ;;
+ ozones)
+ $PAGER $ONE_LOCATION/var/ozones-server.log
+ ;;
+ ozones.error)
+ $PAGER $ONE_LOCATION/var/ozones-server.error
+ ;;
+ *)
+ $PAGER $ONE_LOCATION/var/$1/vm.log
+ ;;
+ esac
else
$PAGER $ONE_LOCATION/var/oned.log
fi
else
if [ -n "$1" ]; then
- $PAGER /var/log/one/$1.log
+ case "$1" in
+ econe)
+ $PAGER /var/log/one/econe-server.log
+ ;;
+ econe.error)
+ $PAGER /var/log/one/econe-server.error
+ ;;
+ sunstone)
+ $PAGER /var/log/one/sunstone.log
+ ;;
+ sunstone.error)
+ $PAGER /var/log/one/sunstone.error
+ ;;
+ occi)
+ $PAGER /var/log/one/occi-server.log
+ ;;
+ occi.error)
+ $PAGER /var/log/one/occi-server.error
+ ;;
+ ozones)
+ $PAGER /var/log/one/ozones-server.log
+ ;;
+ ozones.error)
+ $PAGER /var/log/one/ozones-server.error
+ ;;
+ *)
+ $PAGER /var/log/one/$1.log
+ ;;
+ esac
else
$PAGER /var/log/one/oned.log
fi

0 comments on commit c3da1ef

Please sign in to comment.