(self, gcloud_flags="")
return mylist
Getting the list of GCP objects and returning them as provider objects
Getting the list of GCP objects and returning them as provider objects
Getting the list of GCP objects and returning them as provider objects
def get_list(self, gcloud_flags=""):
        """Getting the list of GCP objects and returning them as provider objects"""
        use_shell = sys.platform == 'win32'
        props = check_output((self.get_gcloud_command() +
                              gcloud_flags).split(), shell=use_shell).split('---')
        mylist = []
        for prop in props:
            if prop is None:
                continue
            item = self.get_new()
            prop = self.yaml.load(prop)
            if prop is None:
                continue
            item.set_properties(prop)
            item.fill_properties()
            mylist.append(item)

        return mylist
def get_list ( self , gcloud_flags = "" ) : use_shell = sys . platform == 'win32' props = check_output ( ( self . get_gcloud_command ( ) + gcloud_flags ) . split ( ) , shell = use_shell ) . split ( '---' ) mylist = [ ] for prop in props : if prop is None : continue item = self . get_new ( ) prop = self . yaml . load ( prop ) if prop is None : continue item . set_properties ( prop ) item . fill_properties ( ) mylist . append ( item ) return mylist