Add missing trait methods to ServiceProvider traits #26
Labels
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/projectmycelium_marketplace#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Multiple controller handlers bypass ServiceProvider by calling concrete services directly (UserPersistence, UserService, SliceRentalService, etc.) because the required methods do not exist on the corresponding traits.
New methods needed
UserProfile trait (~9 methods)
update_notification_settings(user_email, settings)get_compute_resources(user_email)calculate_metrics(user_email)get_active_deployments(user_email)get_applications(user_email)get_purchased_services(user_email)get_purchase_history(user_email)get_or_create_user_data(user_email)(combines load + create_default)save_user_data(user_email, data)(generic persistence)ResourceProviderManager trait (~10 methods)
get_slice_products(user_email)add_slice_product(user_email, product)update_slice_product(user_email, product)delete_slice_product(user_email, product_id)remove_node(user_email, node_id)refresh_slice_calculations(user_email)get_node_slices(user_email, node_id)fetch_and_validate_grid_node(node_id)add_multiple_grid_nodes(user_email, node_ids)sync_nodes_with_grid(user_email)ServiceProviderManager trait (~4 methods)
remove_service_request(user_email, request_id)update_service_request_progress(user_email, request_id, progress, ...)get_sla_by_id(user_email, sla_id)get_user_products(user_email)/add_user_product(user_email, product)WalletManager trait (~2 methods)
configure_auto_topup(user_email, settings)get_auto_topup_settings(user_email)OrderManager trait (~1 method)
transfer_guest_cart(user_email, session)Implementation
src/services/traits/mod.rssrc/services/impl_fixtures/(delegate to existing concrete services)src/services/impl_hero/(delegate to OsisClient)This is a prerequisite for fully rewiring all controllers (issues #10-#17).