Skip to content

Commit

Permalink
ssh updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Feb 14, 2019
1 parent e0ec4d3 commit ef80daf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(as.cluster,gce_instance)
S3method(as.container,character)
S3method(as.container,container)
S3method(as.container,list)
Expand All @@ -16,7 +17,6 @@ S3method(print,gce_instanceList)
S3method(print,gce_region_operation)
S3method(print,gce_zone_operation)
S3method(print,machineTypeList)
export(as.cluster.gce_instance)
export(as.container)
export(container_logs)
export(container_rm)
Expand Down
4 changes: 3 additions & 1 deletion R/metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ Metadata <- function(items) {
#' }
#'
gce_set_metadata <- function(metadata,
instance = NULL,
instance,
project = gce_get_global_project(),
zone = gce_get_global_zone()) {

instance <- if(is.gce_instance(instance)) instance$name else instance

if(instance == "project-wide"){
pw_obj <- gce_get_metadata_project(project)
meta_now <- pw_obj$commonInstanceMetadata$items
Expand Down
2 changes: 1 addition & 1 deletion R/service-accounts.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#' @noRd
gce_make_serviceaccounts <- function(){

if(Sys.getenv(source) == ""){
if(Sys.getenv("GCE_AUTH_FILE") == ""){
stop("No email found in the authentication file at Sys.getenv('GCE_AUTH_FILE')", call.=FALSE)
}

Expand Down
4 changes: 3 additions & 1 deletion R/ssh_admin.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ gce_ssh_setup <- function(instance,
#'
#' @export
gce_check_ssh <- function(instance){
stopifnot(is.gce_instance(instance))
pz <- gce_extract_projectzone(instance)

instance <- gce_get_instance(instance)
instance <- gce_get_instance(instance, project = pz$project, zone = pz$zone)

ssh_keys <- gce_get_metadata(instance, "ssh-keys")$value

Expand Down
2 changes: 1 addition & 1 deletion R/template.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ gce_vm_template <- function(template = c("rstudio","shiny","opencpu",
}

template <- match.arg(template)

assert_that(is.flag(wait),
is.string(image_family))

Expand Down
2 changes: 1 addition & 1 deletion man/as.cluster.gce_instance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/gce_set_metadata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef80daf

Please sign in to comment.