Provided an image name return the OpenStack id for that image
@param [String] i The image name
@return [String] Openstack id for provided image name
330491
def image i
      @logger.debug "OpenStack: Looking up image '#{i}'"
      @compute_client.images.find { |x| x.name == i } || raise("Couldn't find image: #{i}")
    end
1064866
def image_meta_set(self,
                       image_id=None,
                       name=None,
                       **kwargs):  # pylint: disable=C0103
        '''
        
        '''
        nt_ks = self.compute_conn
        if name:
            for image in nt_ks.images.list():
                if image.name == name:
                    image_id = image.id  # pylint: disable=C0103
        if not image_id:
            return {'Error': 'A valid image name or id was not specified'}
        nt_ks.images.set_meta(image_id, kwargs)
        return {image_id: kwargs}
610999
public FileMetaData input(int which, int i)
    {
        checkArgument(which == 0 || which == 1, "which must be either 0 or 1");
        if (which == 0) {
            return levelInputs.get(i);
        }
        else {
            return levelUpInputs.get(i);
        }
    }
898567
def get(self, i):
        
        check_type(i, int)

        return _series_str_result(self, weld_str_get, i=i)
1078493
def _get_local_image_id(docker_binary, docker_tag):
    
    cmd = [docker_binary, "images", "-q", docker_tag]
    image_id_b = check_output(cmd)
    image_id = image_id_b.decode('utf-8').strip()
    if not image_id:
        raise RuntimeError('Unable to find docker image id matching with tag {}'.format(docker_tag))
    return image_id
1158314
def image_show(self, image_id):
        '''
        
        '''
        nt_ks = self.compute_conn
        image = nt_ks.images.get(image_id)
        links = {}
        for link in image.links:
            links[link['rel']] = link['href']
        ret = {
            'name': image.name,
            'id': image.id,
            'status': image.status,
            'progress': image.progress,
            'created': image.created,
            'updated': image.updated,
            'metadata': image.metadata,
            'links': links,
        }
        if hasattr(image, 'minDisk'):
            ret['minDisk'] = image.minDisk
        if hasattr(image, 'minRam'):
            ret['minRam'] = image.minRam

        return ret
711248
def [](id)
      interfaces_hash.fetch(id.to_s) do
        raise UnknownInterface.new(id.to_s),
              "Unknown interface: #{id}"
      end
    end
640785
def image(size = :small, fallback = true)
      image = object&.image&.url(size)
      return image if image.present?

      h.image_url('integral/defaults/no_image_available.jpg') if fallback
    end
487083
def identifier
      @identifier ||= begin
        uri = @representor_hash.href || self.object_id
        protocol = @representor_hash.protocol || (uri == self.object_id ? UNKNOWN_PROTOCOL : DEFAULT_PROTOCOL)
        PROTOCOL_TEMPLATE % [protocol, uri]
      end
    end
256078
def bundle_and_register(img=nil, opts={})
      opts = {:cert         => cert,
              :bucket       => nil,
              :prefix       => image_id,
              :kernel       => kernel_id,
              :ramdisk      => ramdisk_id,
              :ec2cert      => cloud_cert
              }.merge(opts)
      raise "You must specify a bucket to bundle to" if opts[:bucket].nil?
      scp ec2cert, "/mnt/bundle/"
      scp cert, "/mnt/bundle/"
      arch = self[:instanceType].match(/m1\.small|c1\.medium/) ? 'i386' : 'x86_64'
      image = img ? img : make_image(opts)
      ssh "ec2-bundle-image #{image} -d /mnt/bundle -u #{self[:ownerId]} -k /mnt/bundle/pk-*.pem -c /tmp/cert-*.pem"
      manifest = "/mnt/bundle/#{opts[:prefix]}.manifest.xml"
      ssh "ec2-upload-bundle -a #{access_key} -s #{secret_access_key} -m #{manifest}"
      ami_str = ssh "ec2-register-bundle"
      ami = ami_str.grep(/ami-\w*/).first
      return ami
    end
1026372
def image(img = nil)
      return @image if img.nil?
      ImageGC.instance.add(img.id) if @options[:rm]
      @image = img
    end
488194
def identifier(key)
      key &&= key.to_sym
      return unless Rudy::ID_MAP.has_key?(key)
      Rudy::ID_MAP[key]
    end
460608
def base_name_from_image(image):
    
    m = re.match("^(.+/)?([^:/]+)(:[^:]+)?$", image)
    algo_name = m.group(2) if m else image
    return algo_name
509254
def oid(name)
      module_parts = name.to_str.split("::")
      if module_parts.length == 1
        parse_oid(@by_name, name.to_str)
      elsif module_parts.length == 2
        module_name = module_parts[0]
        oid = module_parts[1]
        module_hash = @by_module_by_name[module_name]
        if module_hash
          parse_oid(module_hash, oid)
        else
          raise ModuleNotLoadedError, "module '#{module_name}' not loaded"
        end
      else
        raise ArgumentError, "invalid format: #{name.to_str}"
      end
    end
837749
def getOperationNameForId(i):
    
    for key in operations:
        if int(operations[key]) is int(i):
            return key
    return "Unknown Operation ID %d" % i
1317944
def get_variant_value(identifier)
      data = Gxapi.with_error_handling do
        Timeout::timeout(2.0) do
          Gxapi.cache.fetch(self.cache_key(identifier)) do
            @interface.get_variant(identifier).to_hash
          end
        end
      end
      Ostruct.new(
        data.is_a?(Hash) ? data : self.default_values
      )
    end
701669
public final Node getChildAtIndex(int i) {
    Node n = first;
    while (i > 0) {
      n = n.next;
      i--;
    }
    return n;
  }