小编MT-*_*ong的帖子

如何避免gcloud计算警报存储缓存中的密钥

我写了一些小代码来控制谷歌云平台上的多个计算引擎.整个文件都在github中.

该部分导致的问题gcloud compute ssh如下

def upload_file(self, projectname):
    var = raw_input("Upload file with name: " + projectname + " will remove all file and directory with same name in the instance. Are you sure? (y/n)")
    if var.lower().strip() != "y":
        print "Abort uploading."
        return
    is_zip = False
    if projectname.split('.')[1] == "zip":
        is_zip = True
    fullpath_projectname = __location__ + "/" + projectname
    if os.path.isfile(fullpath_projectname):
        all_instances = self.search_any('instances', filter="labels.type=" + self.working_group_label)
        all_instances_name = [x['name'] for x in all_instances]


        i = …
Run Code Online (Sandbox Code Playgroud)

python google-compute-engine google-cloud-platform gcloud

5
推荐指数
1
解决办法
125
查看次数