Create AtomService by reading service doc from Atom Server.
198632
public static ClientAtomService getAtomService(final String uri, final AuthStrategy authStrategy) throws ProponoException {
        return new ClientAtomService(uri, authStrategy);
    }
354202
def create_services(self, compose_str: str) -> list:
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Services can only be run on '
                               'swarm manager nodes')

        # Initialise empty list
        services_ids = []

        try:
            service_config = yaml.load(compose_str)

            # Deepcopy the service config
            service_list = copy.deepcopy(service_config)

            # Removing version and service from the dict
            service_config.pop('version')
            service_config.pop('services')

            for service_name in service_list['services']:
                service_exist = self._client.services.list(
                    filters={'name': service_name})
                if not service_exist:
                    service_config['name'] = service_name
                    service_spec = self._parse_services(
                        service_config, service_name, service_list)
                    created_service = self._client.services.create(
                        **service_spec)
                    service_id = created_service.short_id
                    LOG.debug('Service created: %s', service_id)
                    services_ids.append(service_id)
                else:
                    LOG.debug('Services already exists')

        except yaml.YAMLError as exc:
            print(exc)

        # Returning list of services created
        return services_ids
899601
def create_archaius(self):
        """"""
        utils.banner("Creating S3")
        s3.init_properties(env=self.env, app=self.app)
332378
def operate(operation, atoms)
      # ActiveSupport always available?
      atoms_sorted = ActiveSupport::OrderedHash.new

      # Sort the atoms into the appropriate shards for writing to individual
      # files.
      atoms.each do |atom_name, records|
        (atoms_sorted[encoded_prefix(atom_name)] ||= ActiveSupport::OrderedHash.new)[atom_name] = records
      end

      atoms_sorted.each do |e_p, atoms|
        path = @path.join(e_p.to_s + INDEX_FILE_EXTENSION)

        lock_file(path) do

          if path.exist?
            from_file = path.open do |f|
              Marshal.load(f)
            end
          else
            from_file = ActiveSupport::OrderedHash.new
          end

          atoms = from_file.merge(atoms){ |k,o,n| o.send(operation, n) }

          write_file(path) do |f|
            Marshal.dump(atoms,f)
          end
        end # end lock.

      end
    end
702217
private void parseAtomServiceDocument(final Document document) throws ProponoException {
        final Element root = document.getRootElement();
        final List<Element> spaces = root.getChildren("workspace", AtomService.ATOM_PROTOCOL);
        for (final Element e : spaces) {
            addWorkspace(new ClientWorkspace(e, this, uri));
        }
    }
473278
function createService (app, Service, Model, options) {
  Model = options.Model || Model;
  if (typeof Model === 'function') {
    assert(options.ModelName, 'createService but options.ModelName not provided');
    options.Model = Model(app, options.ModelName);
  } else {
    options.Model = Model;
  }
  const service = new Service(options);
  return service;
}
699136
function generate(spec) {
  createProjectDirectory();
  spec = addHttpEndpointNames(spec);
  spec = addSocketEndpointFlag(spec);
  spec = addSocketEmitTypeFlag(spec);
  spec = isProxyEndpointAvailable(spec);
  writeFileSync('server.mustache', spec, 'server.js');
  writeFileSync('package.mustache', spec, 'package.json');
}
662924
def parse_atom_file(filename: str) -> AtomFeed:
    """"""
    root = parse_xml(filename).getroot()
    return _parse_atom(root)
946388
@SuppressWarnings("unchecked")
  private static ManagedPartitionService buildPartitionService(
      AtomixConfig config,
      ClusterMembershipService clusterMembershipService,
      ClusterCommunicationService messagingService,
      AtomixRegistry registry) {
    List<ManagedPartitionGroup> partitionGroups = new ArrayList<>();
    for (PartitionGroupConfig<?> partitionGroupConfig : config.getPartitionGroups().values()) {
      partitionGroups.add(partitionGroupConfig.getType().newPartitionGroup(partitionGroupConfig));
    }

    return new DefaultPartitionService(
        clusterMembershipService,
        messagingService,
        new DefaultPrimitiveTypeRegistry(registry.getTypes(PrimitiveType.class)),
        buildSystemPartitionGroup(config),
        partitionGroups,
        new DefaultPartitionGroupTypeRegistry(registry.getTypes(PartitionGroup.Type.class)));
  }
328742
private static ManagedRestService buildRestService(Atomix atomix, Namespace namespace) {
    final String httpHost = namespace.getString("http_host");
    final Integer httpPort = namespace.getInt("http_port");
    return RestService.builder()
        .withAtomix(atomix)
        .withAddress(Address.from(httpHost, httpPort))
        .build();
  }
775575
def _makeService(self):
        
        if self._endpointService is None:
            _service = service
        else:
            _service = self._endpointService
        return _service(
            self.description.encode('ascii'), self.factory.getFactory())
1128405
@Override
    public Object startupService(BundleContext bundleContext)
    {
        service = this.createServiceTracker(context, getHttpContext(), this.getProperties());
        ((HttpServiceTracker)service).open();

        return service;
    }
169007
def _generate_atom_feed(self, feed):
        
        atom_feed = self.init_atom_feed(feed)
        atom_feed.title("Feed")
        return atom_feed
69147
public static Service read(Bundle bundle) {
    String resourcePath = DOCS_CLASSPATH_PREFIX + "/" + SERVICE_DOC_FILE;
    URL bundleResource = bundle.getResource(resourcePath);
    if (bundleResource == null) {
      return null;
    }
    try (InputStream is = bundleResource.openStream()) {
      return new ServiceJson().read(is);
    }
    catch (Throwable ex) {
      log.error("Unable to parse JSON file " + resourcePath + " from bundle " + bundle.getSymbolicName());
      return null;
    }
  }
359127
def build_service(name=None, **kwargs):
    """"""
    if name is not None:
        for kw, value in iteritems(SERVICES[name]):
            kwargs.setdefault(kw, value)
    return apiclient.discovery.build(**kwargs)
209518
def makeService(cls, options):
        
        from axiom.store import Store
        jm = options['journal-mode']
        if jm is not None:
            jm = jm.decode('ascii')
        store = Store(options['dbdir'], debug=options['debug'], journalMode=jm)
        service = IService(store)
        _CheckSystemVersion(store).setServiceParent(service)
        return service
571929
public Object startupService(BundleContext bundleContext)
    {
        // Good, Environment activator is up. Time to start up http services trackers
        
        for (String alias : getAliases())
        {
            Dictionary<String, String> properties = new Hashtable<String, String>();
            ServiceTracker serviceTracker = this.makeServletTracker(alias, properties);
            ((ServiceTracker)serviceTracker).open();
            context.registerService(ServiceTracker.class.getName(), serviceTracker, properties);    // Why isn't this done automatically?
        }

        return null;
    }