Permalink
Browse files

Add get_scp_username to API, to support epumgmt invasive queries

  • Loading branch information...
1 parent 32fac1c commit be6e890cf9d06322da79a09d825196a508c68698 @timf timf committed May 18, 2011
Showing with 7 additions and 0 deletions.
  1. +3 −0 cloudinitd/services.py
  2. +4 −0 cloudinitd/user_api.py
@@ -347,6 +347,9 @@ def get_scp_command(self, src, dst, upload=False, recursive=False, forcehost=Non
cmd += "%s%s:%s %s" % (user, hostname, src, dst)
return cmd
+ def get_scp_username(self):
+ return self._s.scp_username
+
def _get_ssh_command(self, host):
if not host:
raise ConfigException("Trying to create and ssh command to a null hostname, something is not right.")
@@ -448,6 +448,10 @@ def get_scp_command(self, src, dst, upload=False, recursive=False, forcehost=Non
raise APIUsageException("This Cloud service has no real backing service")
return self._svc.get_scp_command(src, dst, upload=upload, recursive=recursive, forcehost=forcehost)
+ def get_scp_username(self):
+ if self._svc is None:
+ raise APIUsageException("This Cloud service has no real backing service")
+ return self._svc.get_scp_username()
class CloudServiceException(ServiceException):

0 comments on commit be6e890

Please sign in to comment.