Problem/Motivation

Add Tenant entity to Facade module and its associated CRUD pages.

The entity holds information on launching Cloud Orchestrator using CFn templates.

Issue fork facade-3340656

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

baldwinlouie created an issue. See original summary.

baldwinlouie’s picture

Status: Active » Needs review

@yas, Please review this patch.

I decided to use the cloud_config->aws_cloud/k8 entity type to bundle model for Tenant. This way, if we want to have different Tenant types in the future, it is possible. There is a submodule called `tenant_providers/openstack_provider`, which provides the `Openstack Tenant` bundle. The bundle is fieldable.

1. It adds the Tenant entity. It then adds an entity bundle called `OpenStack`.
2. Sets up a `Tenant` link in the main menu
3. It adds any/own permission checking for Tenant entity.
4. During Tenant creation, I think it is useful to ask for username and email. (We can default it to some other value) This will be sent to CFn to create Cloud Orchestrator. My plan is to not ask for password because we can have Drupal send a `one-time` login link during user creation. The user can then login and update their password.
5. The Tenant creation form shows a `Region` select box. Right now it doesn't do anything, but it will be used to to determine which regions to create after saving the Tenant.
6. I've moved the `OpenStack Region` configuration entity into the `openstack_provider` module to keep it implementation specific.

I don't have an hook_update_N yet, so you will need to uninstall the facade module and re-enable it to get all the new features.

To use this, the order of operations is
1. Enable the module
2. Create your OpenStack Regions
3. Create the Tenant entities.

yas’s picture

Status: Needs review » Needs work

@baldwinlouie

Thank you for the update. It looks good, and can you fix the following conding standard error?

FILE: /var/www/html/web/modules/contrib/facade/README.md
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Thanks

baldwinlouie’s picture

Status: Needs work » Needs review

@yas, the coding issue has been fixed.

yas’s picture

Status: Needs review » Reviewed & tested by the community

@baldwinlouie

Thank you for the update. It looks good, so I'll merge the patch to 5.x, and close this issue as Fixed.

  • yas committed 516a45f2 on 1.0.x authored by baldwinlouie
    Issue #3340656 by baldwinlouie, yas: Add Tenant entity to Facade module
    
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.