One of the intentions of this class is to pull the vdc method from
Fog::ServiceInterface up into the Entity classes -- it's logic that should
not be there. When that occurs, we can make that call. For now, I do not
want to make change to the vdc method - it's not the purpose of this pull
req.



On Tue, Dec 17, 2013 at 1:50 PM, Sneha Somwanshi
<notifications@github.com>wrote:

> In lib/vcloud/core/vdc.rb:
>
> > @@ -0,0 +1,22 @@
> > +module Vcloud
> > +  module Core
> > +    class Vdc
> > +
> > +      attr_reader :id
> > +
> > +      def self.get_by_name(name)
> > +
> > +        fsi = Vcloud::Fog::ServiceInterface.new
> > +        unless body = fsi.vdc(name)
> > +          raise "Could not find vDC named '#{name}'"
>
> it makes sense to do error handling in fog_interface. So that each time we
> use fsi.vdc(name), we do not need to handle errors.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/alphagov/vcloud-tools/pull/70/files#r8401910>
> .
>