from cloudenvy.envy import Envy


class EnvySnapshot(object):
    """Create a snapshot of an ENVy."""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('snapshot', help='snapshot help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('-n', '--name', action='store', default='',
                               help='Specify custom name for an ENVy.')

        return subparser

    #TODO(jakedahn): The entire UX for this needs to be talked about, refer to
    #                https://github.com/bcwaldon/cloudenvy/issues/27 for any
    #                discussion, if you're curious.
    def run(self, config, args):
        envy = Envy(config)
        envy.snapshot('%s-snapshot' % envy.name)

from cloudenvy.envy import Envy


class EnvySnapshot(object):
    """Create a snapshot of an ENVy."""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('snapshot', help='snapshot help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('-n', '--name', action='store', default='',
                               help='Specify custom name for an ENVy.')

        return subparser

    def run(self, config, args):
        envy = Envy(config)
        envy.snapshot('%s-snapshot' % envy.name)

Remove out-of-date comment about snapshot UX
Remove out-of-date comment about snapshot UX

  from cloudenvy.envy import Envy
  
  
  class EnvySnapshot(object):
      """Create a snapshot of an ENVy."""
  
      def __init__(self, argparser):
          self._build_subparser(argparser)
  
      def _build_subparser(self, subparsers):
          subparser = subparsers.add_parser('snapshot', help='snapshot help')
          subparser.set_defaults(func=self.run)
  
          subparser.add_argument('-n', '--name', action='store', default='',
                                 help='Specify custom name for an ENVy.')
  
          return subparser
  
-     #TODO(jakedahn): The entire UX for this needs to be talked about, refer to
-     #                https://github.com/bcwaldon/cloudenvy/issues/27 for any
-     #                discussion, if you're curious.
      def run(self, config, args):
          envy = Envy(config)
          envy.snapshot('%s-snapshot' % envy.name)
  
Remove out-of-date comment about snapshot UX
## Code Before:
from cloudenvy.envy import Envy


class EnvySnapshot(object):
    """Create a snapshot of an ENVy."""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('snapshot', help='snapshot help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('-n', '--name', action='store', default='',
                               help='Specify custom name for an ENVy.')

        return subparser

    #TODO(jakedahn): The entire UX for this needs to be talked about, refer to
    #                https://github.com/bcwaldon/cloudenvy/issues/27 for any
    #                discussion, if you're curious.
    def run(self, config, args):
        envy = Envy(config)
        envy.snapshot('%s-snapshot' % envy.name)

## Instruction:
Remove out-of-date comment about snapshot UX
## Code After:
from cloudenvy.envy import Envy


class EnvySnapshot(object):
    """Create a snapshot of an ENVy."""

    def __init__(self, argparser):
        self._build_subparser(argparser)

    def _build_subparser(self, subparsers):
        subparser = subparsers.add_parser('snapshot', help='snapshot help')
        subparser.set_defaults(func=self.run)

        subparser.add_argument('-n', '--name', action='store', default='',
                               help='Specify custom name for an ENVy.')

        return subparser

    def run(self, config, args):
        envy = Envy(config)
        envy.snapshot('%s-snapshot' % envy.name)
