private void addService(ServiceModule service) {
    ServiceInfo serviceInfo = service.getModuleInfo();
    Object previousValue = serviceModules.put(service.getId(), service);
    if (previousValue == null) {
      extensionInfo.getServices().add(serviceInfo);
    }
  }
Add a child service module to the extension.

@param service  service module to add
ambari-server/src/main/java/org/apache/ambari/server/stack/ExtensionModule.java