Interface FlavorExtraSpecsApi


  • @Beta
    @Consumes("application/json")
    @Path("/flavors")
    public interface FlavorExtraSpecsApi
    Provides access to the OpenStack Compute (Nova) Flavor Extra Specs Extension API.
    See Also:
    FlavorApi
    • Method Detail

      • getMetadata

        @Named("flavorExtraSpecs:getMetadata")
        @GET
        @Path("/{id}/os-extra_specs")
        Map<String,​String> getMetadata​(@PathParam("id")
                                             String flavorId)
        Retrieves all extra specs for a flavor
        Returns:
        the set of extra metadata for the flavor
      • updateMetadata

        @Named("flavorExtraSpecs:updateMetadata")
        @POST
        @Path("/{id}/os-extra_specs")
        @Produces("application/json")
        void updateMetadata​(@PathParam("id")
                            String flavorId,
                            Map<String,​String> specs)
        Creates or updates the extra specs for a given flavor
        Parameters:
        flavorId - the id of the flavor to modify
        specs - the extra specs to apply
      • getMetadataKey

        @Named("flavorExtraSpecs:getMetadataKey")
        @GET
        @Path("/{id}/os-extra_specs/{key}")
        @Nullable
        String getMetadataKey​(@PathParam("id")
                              String flavorId,
                              @PathParam("key")
                              String key)
        Return a single extra spec value
        Parameters:
        flavorId - the id of the flavor to modify
        key - the extra spec key to retrieve
      • updateMetadataEntry

        @Named("flavorExtraSpecs:updateMetadataEntry")
        @PUT
        @Path("/{id}/os-extra_specs/{key}")
        @Produces("application/json")
        void updateMetadataEntry​(@PathParam("id")
                                 String flavorId,
                                 @PathParam("key")
                                 String key,
                                 String value)
        Creates or updates a single extra spec value
        Parameters:
        flavorId - the id of the flavor to modify
        key - the extra spec key (when creating ensure this does not include whitespace or other difficult characters)
        value - the value to associate with the key
      • deleteMetadataKey

        @Named("flavorExtraSpecs:deleteMetadataKey")
        @DELETE
        @Path("/{id}/os-extra_specs/{key}")
        boolean deleteMetadataKey​(@PathParam("id")
                                  String flavorId,
                                  @PathParam("key")
                                  String key)
        Deletes an extra spec
        Parameters:
        flavorId - the id of the flavor to modify
        key - the extra spec key to delete