From: marios <[email protected]> --- server/deltacloud.rb | 2 ++ server/lib/deltacloud/models/blob.rb | 26 ++++++++++++++++++++++++++ server/lib/deltacloud/models/bucket.rb | 24 ++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 0 deletions(-) create mode 100644 server/lib/deltacloud/models/blob.rb create mode 100644 server/lib/deltacloud/models/bucket.rb
diff --git a/server/deltacloud.rb b/server/deltacloud.rb index 6799b2f..82e5780 100644 --- a/server/deltacloud.rb +++ b/server/deltacloud.rb @@ -13,6 +13,8 @@ require 'deltacloud/models/key' require 'deltacloud/models/instance_profile' require 'deltacloud/models/storage_snapshot' require 'deltacloud/models/storage_volume' +require 'deltacloud/models/bucket' +require 'deltacloud/models/blob' require 'deltacloud/validation' require 'deltacloud/helpers' diff --git a/server/lib/deltacloud/models/blob.rb b/server/lib/deltacloud/models/blob.rb new file mode 100644 index 0000000..44c209d --- /dev/null +++ b/server/lib/deltacloud/models/blob.rb @@ -0,0 +1,26 @@ +# +# Copyright (C) 2009 Red Hat, Inc. +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +class Blob < BaseModel + #already has an id from basemodel (for the key) + attr_accessor :bucket + attr_accessor :content_length + attr_accessor :content_type + attr_accessor :last_modified + attr_accessor :content +end diff --git a/server/lib/deltacloud/models/bucket.rb b/server/lib/deltacloud/models/bucket.rb new file mode 100644 index 0000000..c0a19fa --- /dev/null +++ b/server/lib/deltacloud/models/bucket.rb @@ -0,0 +1,24 @@ +# +# Copyright (C) 2009 Red Hat, Inc. +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +class Bucket < BaseModel + + attr_accessor :name + attr_accessor :size + attr_accessor :blob_list +end -- 1.7.2.3
