From: marios <[email protected]>
Signed-off-by: marios <[email protected]> --- server/lib/deltacloud/models.rb | 2 ++ server/lib/deltacloud/models/instance.rb | 1 + server/lib/deltacloud/models/network.rb | 25 +++++++++++++++++++++++++ server/lib/deltacloud/models/subnet.rb | 27 +++++++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 server/lib/deltacloud/models/network.rb create mode 100644 server/lib/deltacloud/models/subnet.rb diff --git a/server/lib/deltacloud/models.rb b/server/lib/deltacloud/models.rb index e6020e6..7dbf3dc 100644 --- a/server/lib/deltacloud/models.rb +++ b/server/lib/deltacloud/models.rb @@ -32,3 +32,5 @@ require_relative 'models/realm' require_relative 'models/state_machine' require_relative 'models/storage_snapshot' require_relative 'models/storage_volume' +require_relative 'models/network' +require_relative 'models/subnet' diff --git a/server/lib/deltacloud/models/instance.rb b/server/lib/deltacloud/models/instance.rb index 6c6b018..e88e5f0 100644 --- a/server/lib/deltacloud/models/instance.rb +++ b/server/lib/deltacloud/models/instance.rb @@ -34,6 +34,7 @@ module Deltacloud attr_accessor :create_image attr_accessor :firewalls attr_accessor :storage_volumes + attr_accessor :network_bindings def to_hash(context) r = { diff --git a/server/lib/deltacloud/models/network.rb b/server/lib/deltacloud/models/network.rb new file mode 100644 index 0000000..e8a9082 --- /dev/null +++ b/server/lib/deltacloud/models/network.rb @@ -0,0 +1,25 @@ +# +# 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. +module Deltacloud +class Network < BaseModel + + attr_accessor :name + attr_accessor :subnets + attr_accessor :address_blocks + attr_accessor :state + +end +end diff --git a/server/lib/deltacloud/models/subnet.rb b/server/lib/deltacloud/models/subnet.rb new file mode 100644 index 0000000..d91a7a9 --- /dev/null +++ b/server/lib/deltacloud/models/subnet.rb @@ -0,0 +1,27 @@ +# +# 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. + +module Deltacloud +class Subnet < BaseModel + + attr_accessor :name + attr_accessor :network + attr_accessor :address_block + attr_accessor :state + attr_accessor :type + +end +end -- 1.8.1.4
